/** * @return ILoggerConfig[] */ function getConfigs() { $result = []; foreach ($this->config->getValue('app.log') as $appLogConfig) { $result[] = new LoggerConfig($appLogConfig['log_level'], implode(DIRECTORY_SEPARATOR, array($this->appPath->root(), $appLogConfig['log_file']))); } return $result; }
/** * Loads all modules contained in app and builds them. * * @return void */ protected function loadModules() { $moduleMask = implode(DIRECTORY_SEPARATOR, array($this->appPath->root(), 'src', $this->contextName . 'Module.php')); foreach ($this->fileSystem->glob($moduleMask) as $filePath) { $class = $this->loadModule($filePath); $class->build($this->containerBuilder); } }
protected function loadModules() { $moduleMask = implode(DIRECTORY_SEPARATOR, array($this->appPath->root(), "src", $this->contextName . "Module.php")); foreach ($this->fileSystem->glob($moduleMask) as $filePath) { /** @var IModule $class */ $class = $this->fileSystem->loadClass($filePath); $class->build($this->containerBuilder); } }
/** * Creates new instance of storage. * * @param IFileSystem $filesystem File system access provider. * @param IAppPath $appPath Application path provider. * @param string $contextName Application working context name. */ public function __construct(IFileSystem $filesystem, IAppPath $appPath, $contextName) { $this->filesystem = $filesystem; $this->fileName = implode(DIRECTORY_SEPARATOR, array($appPath->root(), 'tmp', 'persistent', $contextName . 'Container')); }
function __construct(ISession $session, IAppPath $appPath) { $this->session = $session; $this->session->setSavePath($appPath->sessions()); }