/** * @param Application $app */ public function bootstrap(Application $app) { if (isset($app['config'])) { error_log('yep'); $this->logFileName = $app['config']->get('dfe.common.logging.log-file-name'); if (null !== ($this->logPath = $app['config']->get('dfe.common.logging.log-path'))) { $this->logPath = rtrim($this->logPath, ' ' . DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; } $this->useCommonLogging = !empty($this->logPath) && !empty($this->logFileName) ? FileSystem::ensurePath($this->logPath) : false; } else { error_log('nope'); } parent::bootstrap($app); }
/** @inheritdoc */ public function getTempPath($subPath = null) { $_key = static::KEY_TEMP_PATH; if (null !== ($_value = $this->getOrDefault($_key))) { return $_value; } $_value = FileSystem::ensurePath(sys_get_temp_dir() . DIRECTORY_SEPARATOR . ltrim($subPath, DIRECTORY_SEPARATOR)); $this->set($_key, $_value); return $_value; }