/** * @return MappingA|null */ public function getParentModuleMap() { if (MappingA::isValid($this->oCurrentModuleMap)) { $oParentModule = $this->oCurrentModuleMap->getModuleMap(); if (ModuleMap::isValid($oParentModule)) { return $oParentModule; } } // return a default root node return new ModuleMap(VSC_RES_PATH . 'config/map.php', ''); }
/** * @param string $sPath * @return string * @throws ExceptionSitemap */ protected function getValidPath($sPath) { if (!is_dir($sPath)) { if (!ModuleMap::isValid($this) && !ModuleMap::isValid($this->getModuleMap())) { throw new ExceptionSitemap('No reference module path to use for relative paths'); } $sPath = $this->getModulePath() . $sPath; } $sPath = realpath($sPath); if (!is_dir($sPath)) { throw new ExceptionSitemap('Template path is not valid.'); } return $sPath . DIRECTORY_SEPARATOR; }