Dumplie\SharedKernel\Infrastructure\Tactician\TacticianExtension::build PHP Method

build() public method

public build ( Dumplie\SharedKernel\Application\ServiceContainer $serviceContainer )
$serviceContainer Dumplie\SharedKernel\Application\ServiceContainer
    public function build(ServiceContainer $serviceContainer)
    {
        $serviceContainer->register(self::TACTICAIN_HANDLER_LOCATOR, new ServiceContainer\Definition(MapLocator::class, [new ServiceContainer\ArgumentService(Services::KERNEL_COMMAND_HANDLER_MAP)]));
        $serviceContainer->register(self::TACTICAIN_COMMAND_EXTRACTOR, new ServiceContainer\Definition(ClassNameExtractor::class));
        $serviceContainer->register(self::TACTICAIN_HANDLE_INFLECTOR, new ServiceContainer\Definition(HandleInflector::class));
        $serviceContainer->register(self::TACTICAIN_MIDDLEWARE_HANDLER, new ServiceContainer\Definition(CommandHandlerMiddleware::class, [new ServiceContainer\ArgumentService(self::TACTICAIN_COMMAND_EXTRACTOR), new ServiceContainer\ArgumentService(self::TACTICAIN_HANDLER_LOCATOR), new ServiceContainer\ArgumentService(self::TACTICAIN_HANDLE_INFLECTOR)]));
        $serviceContainer->register(self::TACTICAIN_MIDDLEWARE_EXTENSION, new ServiceContainer\Definition(ExtensionMiddleware::class, [new ServiceContainer\ArgumentService(Services::KERNEL_COMMAND_EXTENSION_REGISTRY)]));
        $serviceContainer->register(self::TACTICAIN, new ServiceContainer\Definition(Tactician::class, [new ServiceContainer\ArgumentCollection([new ServiceContainer\ArgumentService(self::TACTICAIN_MIDDLEWARE_EXTENSION), new ServiceContainer\ArgumentService(self::TACTICAIN_MIDDLEWARE_HANDLER)])]));
        $serviceContainer->register(Services::KERNEL_COMMAND_BUS, new ServiceContainer\Definition(CommandBus::class, [new ServiceContainer\ArgumentService(self::TACTICAIN)]));
    }
TacticianExtension