| 1 | <?php |
||
| 8 | class NullStatisticsLogger implements StatisticsLogger |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * The Channel manager. |
||
| 12 | * |
||
| 13 | * @var \BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager |
||
| 14 | */ |
||
| 15 | protected $channelManager; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * The statistics driver instance. |
||
| 19 | * |
||
| 20 | * @var \BeyondCode\LaravelWebSockets\Statistics\Drivers\StatisticsDriver |
||
| 21 | */ |
||
| 22 | protected $driver; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Initialize the logger. |
||
| 26 | * |
||
| 27 | * @param \BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager $channelManager |
||
| 28 | * @param \BeyondCode\LaravelWebSockets\Statistics\Drivers\StatisticsDriver $driver |
||
| 29 | * @return void |
||
|
|
|||
| 30 | */ |
||
| 31 | public function __construct(ChannelManager $channelManager, StatisticsDriver $driver) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Handle the incoming websocket message. |
||
| 39 | * |
||
| 40 | * @param mixed $appId |
||
| 41 | * @return void |
||
| 42 | */ |
||
| 43 | public function webSocketMessage($appId) |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Handle the incoming API message. |
||
| 50 | * |
||
| 51 | * @param mixed $appId |
||
| 52 | * @return void |
||
| 53 | */ |
||
| 54 | public function apiMessage($appId) |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Handle the new conection. |
||
| 61 | * |
||
| 62 | * @param mixed $appId |
||
| 63 | * @return void |
||
| 64 | */ |
||
| 65 | public function connection($appId) |
||
| 69 | |||
| 70 | /** |
||
| 71 | * Handle disconnections. |
||
| 72 | * |
||
| 73 | * @param mixed $appId |
||
| 74 | * @return void |
||
| 75 | */ |
||
| 76 | public function disconnection($appId) |
||
| 80 | |||
| 81 | /** |
||
| 82 | * Save all the stored statistics. |
||
| 83 | * |
||
| 84 | * @return void |
||
| 85 | */ |
||
| 86 | public function save() |
||
| 90 | } |
||
| 91 |
Adding a
@returnannotation 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.