public static function build(Configuration $configuration = null): DIContainer
    {
        if ($configuration === null) {
            $configuration = new Configuration();
        }

        $defaultDefinitions = \array_merge(
            require __DIR__ . '/definitions.php',
            [Configuration::class => $configuration]
        );
        $customDefinitions = self::parseDefinitions($configuration->getDefinitions());

        return self::getContainerBuilder($configuration)
            ->addDefinitions($defaultDefinitions, ...$customDefinitions)
            ->build();
    }
public static function build(Configuration $configuration = null): DIContainer
    {
        if ($configuration === null) {
            $configuration = new Configuration();
        }

        $defaultDefinitions = \array_merge(
            require __DIR__ . '/definitions.php',
            [Configuration::class => $configuration]
        );
        $customDefinitions = self::parseDefinitions($configuration->getDefinitions());

        return self::getContainerBuilder($configuration)
            ->addDefinitions($defaultDefinitions, ...$customDefinitions)
            ->build();
    }
public static function build ( Configuration $ configuration = null ) : DIContainer { if ( $ configuration === null ) { $ configuration = new Configuration ( ) ; } $ defaultDefinitions = \ array_merge ( require __DIR__ . '/definitions.php' , [ Configuration :: class => $ configuration ] ) ; $ customDefinitions = self :: parseDefinitions ( $ configuration -> getDefinitions ( ) ) ; return self :: getContainerBuilder ( $ configuration ) -> addDefinitions ( $ defaultDefinitions , ... $ customDefinitions ) -> build ( ) ; }
Build PHP-DI container.

@param Configuration|null $configuration

@throws \RuntimeException

@return DIContainer
Build PHP - DI container .