for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace BeyondCode\LaravelWebSockets\Statistics\Logger;
use BeyondCode\LaravelWebSockets\Statistics\Drivers\StatisticsDriver;
use BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager;
class NullStatisticsLogger implements StatisticsLogger
{
/**
* The Channel manager.
*
* @var \BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager
*/
protected $channelManager;
* The statistics driver instance.
* @var \BeyondCode\LaravelWebSockets\Statistics\Drivers\StatisticsDriver
protected $driver;
* Initialize the logger.
* @param \BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager $channelManager
* @param \BeyondCode\LaravelWebSockets\Statistics\Drivers\StatisticsDriver $driver
* @return void
@return
Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.
Please refer to the PHP core documentation on constructors.
public function __construct(ChannelManager $channelManager, StatisticsDriver $driver)
$this->channelManager = $channelManager;
$this->driver = $driver;
}
* Handle the incoming websocket message.
* @param mixed $appId
public function webSocketMessage($appId)
//
* Handle the incoming API message.
public function apiMessage($appId)
* Handle the new conection.
public function connection($appId)
* Handle disconnections.
public function disconnection($appId)
* Save all the stored statistics.
public function save()
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.