src/Zicht/Tool/Application.php
public function getContainer($forceRecompile = false)
    {
        if (null === $this->container) {
            $config = $this->loader->processConfiguration();
            $config['z']['sources'] = $this->loader->getSourceFiles();
            $config['z']['cache_file'] = sys_get_temp_dir() . '/z_' . $this->getCacheKey($config) . '.php';
            if ($forceRecompile && is_file($config['z']['cache_file'])) {
                unlink($config['z']['cache_file']);
                clearstatcache();
            }
            $compiler = new ContainerCompiler(
                $config,
                $this->loader->getPlugins(),
                $config['z']['cache_file']
            );
            $this->container = $compiler->getContainer();
        }
        return $this->container;
    }
public function getContainer($forceRecompile = false)
    {
        if (null === $this->container) {
            $config = $this->loader->processConfiguration();
            $config['z']['sources'] = $this->loader->getSourceFiles();
            $config['z']['cache_file'] = sys_get_temp_dir() . '/z_' . $this->getCacheKey($config) . '.php';
            if ($forceRecompile && is_file($config['z']['cache_file'])) {
                unlink($config['z']['cache_file']);
                clearstatcache();
            }
            $compiler = new ContainerCompiler(
                $config,
                $this->loader->getPlugins(),
                $config['z']['cache_file']
            );
            $this->container = $compiler->getContainer();
        }
        return $this->container;
    }
public function getContainer ( $ forceRecompile = false ) { if ( null === $ this -> container ) { $ config = $ this -> loader -> processConfiguration ( ) ; $ config [ 'z' ] [ 'sources' ] = $ this -> loader -> getSourceFiles ( ) ; $ config [ 'z' ] [ 'cache_file' ] = sys_get_temp_dir ( ) . '/z_' . $ this -> getCacheKey ( $ config ) . '.php' ; if ( $ forceRecompile && is_file ( $ config [ 'z' ] [ 'cache_file' ] ) ) { unlink ( $ config [ 'z' ] [ 'cache_file' ] ) ; clearstatcache ( ) ; } $ compiler = new ContainerCompiler ( $ config , $ this -> loader -> getPlugins ( ) , $ config [ 'z' ] [ 'cache_file' ] ) ; $ this -> container = $ compiler -> getContainer ( ) ; } return $ this -> container ; }
Returns the container instance, and initializes it if not yet available.

@param bool $forceRecompile
@return Container
Returns the container instance and initializes it if not yet available .