2022-01-12 11:29:50 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Kiri\Server\Broadcast;
|
|
|
|
|
|
|
|
|
|
|
2022-01-12 11:41:26 +08:00
|
|
|
use Kiri\Kiri;
|
2022-01-12 11:29:50 +08:00
|
|
|
use Kiri\Server\Contract\OnPipeMessageInterface;
|
2022-01-12 11:41:26 +08:00
|
|
|
use Psr\Log\LoggerInterface;
|
2022-01-12 11:29:50 +08:00
|
|
|
|
|
|
|
|
class Message implements OnPipeMessageInterface
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param mixed $data
|
|
|
|
|
*/
|
|
|
|
|
public function __construct(public mixed $data)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function process(): void
|
|
|
|
|
{
|
2022-01-12 11:41:26 +08:00
|
|
|
$logger = Kiri::getDi()->get(LoggerInterface::class);
|
|
|
|
|
$logger->debug('workerId::' . env('environmental_workerId'));
|
|
|
|
|
$logger->debug($this->data->data . '::' . static::class);
|
2022-01-12 11:29:50 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|