pixelfederation/swoole-bundle

View on GitHub
src/Bridge/Symfony/Event/WorkerStartedEvent.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

declare(strict_types=1);

namespace K911\Swoole\Bridge\Symfony\Event;

use Swoole\Server;
use Symfony\Contracts\EventDispatcher\Event;

final class WorkerStartedEvent extends Event
{
    public const NAME = 'swoole_bundle.worker.started';

    public function __construct(
        private Server $server,
        private int $workerId
    ) {
    }

    public function getServer(): Server
    {
        return $this->server;
    }

    public function getWorkerId(): int
    {
        return $this->workerId;
    }
}