Kraken\Channel\ChannelComposite::__construct PHP Method

__construct() public method

public __construct ( string $name, Kraken\Channel\ChannelInterface[] | Kraken\Channel\ChannelCompositeInterface[] $buses = [], Kraken\Channel\Router\RouterCompositeInterface $router, Kraken\Loop\LoopInterface $loop )
$name string
$buses Kraken\Channel\ChannelInterface[] | Kraken\Channel\ChannelCompositeInterface[]
$router Kraken\Channel\Router\RouterCompositeInterface
$loop Kraken\Loop\LoopInterface
    public function __construct($name, $buses = [], RouterCompositeInterface $router, LoopInterface $loop)
    {
        $this->name = $name;
        $this->buses = [];
        $this->router = $router;
        $this->loop = $loop;
        $this->events = [];
        $this->seed = GeneratorSupport::genId($this->name);
        $this->counter = 1000000000.0;
        foreach ($buses as $name => $channel) {
            $this->setBus($name, $channel);
        }
    }