lib/D4rk4ng3l/Container/ContainerLoader.php
public static function getContainer($appPath, $env = null)
    {
        static::$appPath = $appPath;
        static::$cachePath = $appPath . '/app/cache';
        static::$configPath = $appPath . '/app/config';

        $containerCacheFile   = static::$cachePath . '/container.php';
        $containerConfigCache = new ConfigCache($containerCacheFile, $env != 'prod');

        if (!$containerConfigCache->isFresh()) {
            $containerBuilder = static::buildContainer();
            $dumper           = new PhpDumper($containerBuilder);
            $containerConfigCache->write(
                $dumper->dump(array('class' => 'CompiledContainer')),
                $containerBuilder->getResources()
            );
        }

        require_once $containerCacheFile;

        $container = new CompiledContainer();

        return $container;
    }
public static function getContainer($appPath, $env = null)
    {
        static::$appPath = $appPath;
        static::$cachePath = $appPath . '/app/cache';
        static::$configPath = $appPath . '/app/config';

        $containerCacheFile   = static::$cachePath . '/container.php';
        $containerConfigCache = new ConfigCache($containerCacheFile, $env != 'prod');

        if (!$containerConfigCache->isFresh()) {
            $containerBuilder = static::buildContainer();
            $dumper           = new PhpDumper($containerBuilder);
            $containerConfigCache->write(
                $dumper->dump(array('class' => 'CompiledContainer')),
                $containerBuilder->getResources()
            );
        }

        require_once $containerCacheFile;

        $container = new CompiledContainer();

        return $container;
    }
@param string $appPath
@param string $env

@return CompiledContainer