コード例 #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
ファイル: AppBuilder.php プロジェクト: conpago/conpago
 /**
  * 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
ファイル: AppBuilder.php プロジェクト: agborkowski/conpago
 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
ファイル: BuilderStorage.php プロジェクト: conpago/conpago
 /**
  * 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());
 }