Core.php
protected function initServiceContainer(Container $container)
    {
        $sr = new ServiceRegistrator($this->coreRoot, "Wpci\\Core\\", $container);

        $sr->exclude(Path::class);

        $sr->prepareArguments(View::class,
            [
                TemplateInterface::class => MustacheTemplate::class,
                ResponseInterface::class => WpResponse::class
            ]
        );

        $sr->walkDirForServices('Flow');
        $sr->walkDirForServices('DataSource');
        $sr->walkDirForServices('Helpers');
        $sr->walkDirForServices('Http');
        $sr->walkDirForServices('Render');
        $sr->walkDirForServices('Wordpress');

        $container->singleton('router-store', \Wpci\Core\Http\RouterStore::class);
        $container->instance('promise-pool.shutdown', new PromisePool());
    }
protected function initServiceContainer(Container $container)
    {
        $sr = new ServiceRegistrator($this->coreRoot, "Wpci\\Core\\", $container);

        $sr->exclude(Path::class);

        $sr->prepareArguments(View::class,
            [
                TemplateInterface::class => MustacheTemplate::class,
                ResponseInterface::class => WpResponse::class
            ]
        );

        $sr->walkDirForServices('Flow');
        $sr->walkDirForServices('DataSource');
        $sr->walkDirForServices('Helpers');
        $sr->walkDirForServices('Http');
        $sr->walkDirForServices('Render');
        $sr->walkDirForServices('Wordpress');

        $container->singleton('router-store', \Wpci\Core\Http\RouterStore::class);
        $container->instance('promise-pool.shutdown', new PromisePool());
    }
protected function initServiceContainer ( Container $ container ) { $ sr = new ServiceRegistrator ( $ this -> coreRoot , "Wpci\\Core\\" , $ container ) ; $ sr -> exclude ( Path :: class ) ; $ sr -> prepareArguments ( View :: class , [ TemplateInterface :: class => MustacheTemplate :: class , ResponseInterface :: class => WpResponse :: class ] ) ; $ sr -> walkDirForServices ( 'Flow' ) ; $ sr -> walkDirForServices ( 'DataSource' ) ; $ sr -> walkDirForServices ( 'Helpers' ) ; $ sr -> walkDirForServices ( 'Http' ) ; $ sr -> walkDirForServices ( 'Render' ) ; $ sr -> walkDirForServices ( 'Wordpress' ) ; $ container -> singleton ( 'router-store' , \ Wpci \ Core \ Http \ RouterStore :: class ) ; $ container -> instance ( 'promise-pool.shutdown' , new PromisePool ( ) ) ; }
Service container inti instructions
@param ContainerBuilder $container
@throws \Exception
Service container inti instructions