SlimCMS\Modules\SModuleManager::__construct PHP Method

__construct() public method

public __construct ( boolean $cache )
$cache boolean
    public function __construct($cache)
    {
        $this->filesystem = new Filesystem();
        $this->moduleContainer = new Container();
        $this->cache = !$cache;
        $container = AppFactory::getInstance()->getContainer();
        $container['cache'] = function () {
            $cacheContainer = new Container();
            $cacheContainer->singleton('files', function () {
                return new Filesystem();
            });
            $cacheContainer->singleton('config', function () {
                return AppFactory::getInstance()->getContainer()->config['cache'];
            });
            return new CacheManager($cacheContainer);
        };
        $this->cacheManager = $container->get('cache');
    }