protected function buildContainer() {
		$cache = $this->getCache();
		if($cache) {
			if(($container = $cache->fetch('asgard.container')) instanceof \Asgard\Container\Container) {
				$container['kernel'] = $this;
				$container['errorHandler'] = $this->errorHandler;

				$this->container = $container;
				#make $this->container the default instance of Container, in case someones uses it
				\Asgard\Container\Container::setInstance($this->container);
				return $this->container;
			}
		}

		$bundles = $this->getAllBundles();
		#use the Container default instance, in case someones uses it
		$container = $this->container = \Asgard\Container\Container::singleton();
		$container['errorHandler'] = $this->errorHandler;
		$container['kernel'] = $this;
		$container['config'] = $this->getConfig();

		foreach($bundles as $bundle)
			$bundle->buildContainer($container);

		if($cache)
			$cache->save('asgard.container', $container);

		return $container;
	}
protected function buildContainer() {
		$cache = $this->getCache();
		if($cache) {
			if(($container = $cache->fetch('asgard.container')) instanceof \Asgard\Container\Container) {
				$container['kernel'] = $this;
				$container['errorHandler'] = $this->errorHandler;

				$this->container = $container;
				#make $this->container the default instance of Container, in case someones uses it
				\Asgard\Container\Container::setInstance($this->container);
				return $this->container;
			}
		}

		$bundles = $this->getAllBundles();
		#use the Container default instance, in case someones uses it
		$container = $this->container = \Asgard\Container\Container::singleton();
		$container['errorHandler'] = $this->errorHandler;
		$container['kernel'] = $this;
		$container['config'] = $this->getConfig();

		foreach($bundles as $bundle)
			$bundle->buildContainer($container);

		if($cache)
			$cache->save('asgard.container', $container);

		return $container;
	}
protected function buildContainer ( ) { $ cache = $ this -> getCache ( ) ; if ( $ cache ) { if ( ( $ container = $ cache -> fetch ( 'asgard.container' ) ) instanceof \ Asgard \ Container \ Container ) { $ container [ 'kernel' ] = $ this ; $ container [ 'errorHandler' ] = $ this -> errorHandler ; $ this -> container = $ container ; #make $this->container the default instance of Container, in case someones uses it \ Asgard \ Container \ Container :: setInstance ( $ this -> container ) ; return $ this -> container ; } } $ bundles = $ this -> getAllBundles ( ) ; #use the Container default instance, in case someones uses it $ container = $ this -> container = \ Asgard \ Container \ Container :: singleton ( ) ; $ container [ 'errorHandler' ] = $ this -> errorHandler ; $ container [ 'kernel' ] = $ this ; $ container [ 'config' ] = $ this -> getConfig ( ) ; foreach ( $ bundles as $ bundle ) $ bundle -> buildContainer ( $ container ) ; if ( $ cache ) $ cache -> save ( 'asgard.container' , $ container ) ; return $ container ; }
Register the bundle's services.
@return \Asgard\Container\ContainerInterface
Register the bundle s services .