Kraken\Root\Console\Client\Provider\ConsoleBootProvider::boot PHP Method

boot() protected method

protected boot ( Kraken\Container\ContainerInterface $container )
$container Kraken\Container\ContainerInterface
    protected function boot(ContainerInterface $container)
    {
        $core = $container->make('Kraken\\Core\\CoreInterface');
        $factory = $container->make('Kraken\\Console\\Client\\Command\\CommandFactoryInterface');
        $manager = $container->make('Kraken\\Console\\Client\\Command\\CommandManagerInterface');
        $channel = $container->make('Kraken\\Console\\Client\\Service\\ChannelConsole');
        $console = $container->make('Kraken\\Console\\Client\\ClientInterface');
        $cmds = (array) $factory->getDefinitions();
        $commands = [];
        foreach ($cmds as $command => $definition) {
            $commands[] = $factory->create($command, [$channel, 'Server']);
        }
        $manager->setAutoExit(false);
        $manager->setVersion($core->getVersion());
        $manager->addCommands($commands);
        $console->onCommand(function () use($manager) {
            $manager->run();
        });
    }
ConsoleBootProvider