laravel-websockets/src/Statistics/Logger/NullStatisticsLogger.php

92 lines
1.9 KiB
PHP
Raw Normal View History

2020-08-17 18:17:00 +00:00
<?php
namespace BeyondCode\LaravelWebSockets\Statistics\Logger;
use BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager;
use Clue\React\Buzz\Browser;
use Ratchet\ConnectionInterface;
class NullStatisticsLogger implements StatisticsLogger
{
2020-08-18 17:21:22 +00:00
/**
* The Channel manager.
*
* @var \BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager
*/
2020-08-17 18:17:00 +00:00
protected $channelManager;
2020-08-18 17:21:22 +00:00
/**
* The Browser instance.
*
* @var \Clue\React\Buzz\Browser
*/
2020-08-17 18:17:00 +00:00
protected $browser;
2020-08-18 17:21:22 +00:00
/**
* Initialize the logger.
*
* @param \BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager $channelManager
* @param \Clue\React\Buzz\Browser $browser
* @return void
*/
2020-08-17 18:17:00 +00:00
public function __construct(ChannelManager $channelManager, Browser $browser)
{
$this->channelManager = $channelManager;
$this->browser = $browser;
}
2020-08-18 17:21:22 +00:00
/**
* Handle the incoming websocket message.
*
* @param \Ratchet\ConnectionInterface $connection
* @return void
*/
2020-08-17 18:17:00 +00:00
public function webSocketMessage(ConnectionInterface $connection)
{
//
}
2020-08-18 17:21:22 +00:00
/**
* Handle the incoming API message.
*
* @param mixed $appId
* @return void
*/
2020-08-17 18:17:00 +00:00
public function apiMessage($appId)
{
//
}
2020-08-18 17:21:22 +00:00
/**
* Handle the new conection.
*
* @param \Ratchet\ConnectionInterface $connection
* @return void
*/
2020-08-17 18:17:00 +00:00
public function connection(ConnectionInterface $connection)
{
//
}
2020-08-18 17:21:22 +00:00
/**
* Handle disconnections.
*
* @param \Ratchet\ConnectionInterface $connection
* @return void
*/
2020-08-17 18:17:00 +00:00
public function disconnection(ConnectionInterface $connection)
{
//
}
2020-08-18 17:21:22 +00:00
/**
* Save all the stored statistics.
*
* @return void
*/
2020-08-17 18:17:00 +00:00
public function save()
{
//
}
}