Kraken\Root\Provider\ChannelProvider::register PHP Method

register() protected method

protected register ( Kraken\Container\ContainerInterface $container )
$container Kraken\Container\ContainerInterface
    protected function register(ContainerInterface $container)
    {
        $loop = $container->make('Kraken\\Loop\\LoopInterface');
        $context = $container->make('Kraken\\Runtime\\RuntimeContextInterface');
        $modelFactory = new ChannelModelFactory($context->getAlias(), $loop);
        $factory = new ChannelFactory($context->getAlias(), $modelFactory, $loop);
        $container->instance('Kraken\\Channel\\ChannelModelFactoryInterface', $modelFactory);
        $container->factory('Kraken\\Channel\\ChannelModelInterface', function () use($modelFactory) {
            return $modelFactory->create('Kraken\\Channel\\Model\\Null\\NullModel');
        });
        $container->instance('Kraken\\Channel\\ChannelFactoryInterface', $factory);
        $container->factory('Kraken\\Channel\\ChannelInterface', [$factory, 'create']);
        $container->factory('Kraken\\Channel\\ChannelCompositeInterface', [$factory, 'create']);
    }