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;
|
2020-08-19 19:39:38 +00:00
|
|
|
use BeyondCode\LaravelWebSockets\Statistics\Drivers\StatisticsDriver;
|
2020-08-17 18:17:00 +00:00
|
|
|
|
|
|
|
|
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
|
|
|
/**
|
2020-08-19 19:39:38 +00:00
|
|
|
* The statistics driver instance.
|
2020-08-18 17:21:22 +00:00
|
|
|
*
|
2020-08-19 19:39:38 +00:00
|
|
|
* @var \BeyondCode\LaravelWebSockets\Statistics\Drivers\StatisticsDriver
|
2020-08-18 17:21:22 +00:00
|
|
|
*/
|
2020-08-19 19:39:38 +00:00
|
|
|
protected $driver;
|
2020-08-17 18:17:00 +00:00
|
|
|
|
2020-08-18 17:21:22 +00:00
|
|
|
/**
|
|
|
|
|
* Initialize the logger.
|
|
|
|
|
*
|
|
|
|
|
* @param \BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager $channelManager
|
2020-08-19 19:39:38 +00:00
|
|
|
* @param \BeyondCode\LaravelWebSockets\Statistics\Drivers\StatisticsDriver $driver
|
2020-08-18 17:21:22 +00:00
|
|
|
* @return void
|
|
|
|
|
*/
|
2020-08-19 19:39:38 +00:00
|
|
|
public function __construct(ChannelManager $channelManager, StatisticsDriver $driver)
|
2020-08-17 18:17:00 +00:00
|
|
|
{
|
|
|
|
|
$this->channelManager = $channelManager;
|
2020-08-19 19:39:38 +00:00
|
|
|
$this->driver = $driver;
|
2020-08-17 18:17:00 +00:00
|
|
|
}
|
|
|
|
|
|
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()
|
|
|
|
|
{
|
|
|
|
|
//
|
|
|
|
|
}
|
|
|
|
|
}
|