/** * @param string $path * @return string */ public static function build($path) { if (FileFullPathRecognizer::isFullPath($path) === false) { $path = FilePathCombiner::combine(static::getRootPath(), $path); } return $path; }
/** * @return string */ public function getAppRootPath() { $configName = 'hyperframework.app_root_path'; $appRootPath = $this->getString($configName); if ($this->appRootPath === null || $appRootPath !== $this->appRootPath) { if ($appRootPath === null) { throw new ConfigException("Config '{$configName}' does not exist."); } $isFullPath = FileFullPathRecognizer::isFullPath($appRootPath); if ($isFullPath === false) { throw new ConfigException("The value of config '{$configName}'" . " must be a full path, '{$appRootPath}' given."); } $this->appRootPath = $appRootPath; } return $appRootPath; }