Пример #1
0
 /**
  * @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;
 }
Пример #2
0
 /**
  * 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);
     }
 }
Пример #3
0
 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);
     }
 }
Пример #4
0
 /**
  * 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'));
 }
Пример #5
0
 function __construct(ISession $session, IAppPath $appPath)
 {
     $this->session = $session;
     $this->session->setSavePath($appPath->sessions());
 }