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

92 lines
2.0 KiB
PHP
Raw Normal View History

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