public function getBasePath()
{
if ($this->_basePath === null) {
$basePath = $this->getApplication()->getBasePath() . DIRECTORY_SEPARATOR . self::DEFAULT_BASEPATH;
if (($this->_basePath = realpath($basePath)) === false || !is_dir($this->_basePath)) {
$basePath = $this->getApplication()->getBasePath() . DIRECTORY_SEPARATOR . self::FALLBACK_BASEPATH;
if (($this->_basePath = realpath($basePath)) === false || !is_dir($this->_basePath)) {
throw new TConfigurationException('pageservice_basepath_invalid', $basePath);
}
}
}
return $this->_basePath;
}