public static function setDefaultServices($container)
    {
        $project_root = self::projectRoot();

        $container
            ->share('projectXTemplate', \Droath\ProjectX\Template\TemplateManager::class);
        $container
            ->share('projectXGitHubUserAuth', \Droath\ProjectX\Service\GitHubUserAuthStore::class);
        $container
            ->share('projectXHostChecker', \Droath\ProjectX\Service\HostChecker::class);
        $container
            ->add('projectXEngine', function () use ($container) {
                return (new \Droath\ProjectX\Engine\EngineTypeFactory(
                    $container->get('projectXEngineResolver')
                ))->createInstance();
            });
        $container
            ->share('projectXEngineResolver', \Droath\ProjectX\Engine\EngineTypeResolver::class)
            ->withArgument('projectXFilesystemCache');
        $container
            ->add('projectXProject', function () use ($container) {
                return (new \Droath\ProjectX\Project\ProjectTypeFactory(
                    $container->get('projectXProjectResolver')
                ))->createInstance();
            });
        $container
            ->share('projectXProjectResolver', \Droath\ProjectX\Project\ProjectTypeResolver::class)
            ->withArgument('projectXFilesystemCache');
        $container
            ->add('projectXPlatform', function () use ($container) {
                return (new PlatformTypeFactory(
                    $container->get('projectXPlatformResolver')
                ))->createInstance();
            });
        $container
            ->share('projectXPlatformResolver', PlatformTypeResolver::class)
            ->withArgument('projectXFilesystemCache');
        $container
            ->share('projectXFilesystemCache', \Symfony\Component\Cache\Adapter\FilesystemAdapter::class)
            ->withArguments(['', 0, "$project_root/.project-x/cache"]);
    }
public static function setDefaultServices($container)
    {
        $project_root = self::projectRoot();

        $container
            ->share('projectXTemplate', \Droath\ProjectX\Template\TemplateManager::class);
        $container
            ->share('projectXGitHubUserAuth', \Droath\ProjectX\Service\GitHubUserAuthStore::class);
        $container
            ->share('projectXHostChecker', \Droath\ProjectX\Service\HostChecker::class);
        $container
            ->add('projectXEngine', function () use ($container) {
                return (new \Droath\ProjectX\Engine\EngineTypeFactory(
                    $container->get('projectXEngineResolver')
                ))->createInstance();
            });
        $container
            ->share('projectXEngineResolver', \Droath\ProjectX\Engine\EngineTypeResolver::class)
            ->withArgument('projectXFilesystemCache');
        $container
            ->add('projectXProject', function () use ($container) {
                return (new \Droath\ProjectX\Project\ProjectTypeFactory(
                    $container->get('projectXProjectResolver')
                ))->createInstance();
            });
        $container
            ->share('projectXProjectResolver', \Droath\ProjectX\Project\ProjectTypeResolver::class)
            ->withArgument('projectXFilesystemCache');
        $container
            ->add('projectXPlatform', function () use ($container) {
                return (new PlatformTypeFactory(
                    $container->get('projectXPlatformResolver')
                ))->createInstance();
            });
        $container
            ->share('projectXPlatformResolver', PlatformTypeResolver::class)
            ->withArgument('projectXFilesystemCache');
        $container
            ->share('projectXFilesystemCache', \Symfony\Component\Cache\Adapter\FilesystemAdapter::class)
            ->withArguments(['', 0, "$project_root/.project-x/cache"]);
    }
public static function setDefaultServices ( $ container ) { $ project_root = self :: projectRoot ( ) ; $ container -> share ( 'projectXTemplate' , \ Droath \ ProjectX \ Template \ TemplateManager :: class ) ; $ container -> share ( 'projectXGitHubUserAuth' , \ Droath \ ProjectX \ Service \ GitHubUserAuthStore :: class ) ; $ container -> share ( 'projectXHostChecker' , \ Droath \ ProjectX \ Service \ HostChecker :: class ) ; $ container -> add ( 'projectXEngine' , function ( ) use ( $ container ) { return ( new \ Droath \ ProjectX \ Engine \ EngineTypeFactory ( $ container -> get ( 'projectXEngineResolver' ) ) ) -> createInstance ( ) ; } ) ; $ container -> share ( 'projectXEngineResolver' , \ Droath \ ProjectX \ Engine \ EngineTypeResolver :: class ) -> withArgument ( 'projectXFilesystemCache' ) ; $ container -> add ( 'projectXProject' , function ( ) use ( $ container ) { return ( new \ Droath \ ProjectX \ Project \ ProjectTypeFactory ( $ container -> get ( 'projectXProjectResolver' ) ) ) -> createInstance ( ) ; } ) ; $ container -> share ( 'projectXProjectResolver' , \ Droath \ ProjectX \ Project \ ProjectTypeResolver :: class ) -> withArgument ( 'projectXFilesystemCache' ) ; $ container -> add ( 'projectXPlatform' , function ( ) use ( $ container ) { return ( new PlatformTypeFactory ( $ container -> get ( 'projectXPlatformResolver' ) ) ) -> createInstance ( ) ; } ) ; $ container -> share ( 'projectXPlatformResolver' , PlatformTypeResolver :: class ) -> withArgument ( 'projectXFilesystemCache' ) ; $ container -> share ( 'projectXFilesystemCache' , \ Symfony \ Component \ Cache \ Adapter \ FilesystemAdapter :: class ) -> withArguments ( [ '' , 0 , "$project_root/.project-x/cache" ] ) ; }
Set default container services.
Set default container services .