Kraken\Root\Console\Server\Provider\ChannelProvider::boot PHP Метод

boot() защищенный Метод

protected boot ( Kraken\Container\ContainerInterface $container )
$container Kraken\Container\ContainerInterface
    protected function boot(ContainerInterface $container)
    {
        $runtime = $container->make('Kraken\\Runtime\\RuntimeContainerInterface');
        $channel = $container->make('Kraken\\Runtime\\Service\\ChannelInternal');
        $loop = $container->make('Kraken\\Loop\\LoopInterface');
        $this->applyConsoleRouting($runtime, $channel);
        $runtime->on('create', function () use($channel) {
            $channel->start();
        });
        $runtime->on('destroy', function () use($loop, $channel) {
            $loop->onTick(function () use($channel) {
                $channel->stop();
            });
        });
    }