public function getPHPConfig()
{
if (!is_null($this->_oldConfig)) {
return $this->_oldConfig;
}
$path = $GLOBALS['registry']->get('fileroot', $this->_app) . '/config';
if (file_exists($path . '/conf.php')) {
$this->_oldConfig = file_get_contents($path . '/conf.php');
if (!empty($this->_oldConfig)) {
$this->_oldConfig = preg_replace('/<\\?php\\n?/', '', $this->_oldConfig);
$pos = strpos($this->_oldConfig, $this->_configBegin);
if ($pos !== false) {
$this->_preConfig = substr($this->_oldConfig, 0, $pos);
$this->_oldConfig = substr($this->_oldConfig, $pos);
}
$pos = strpos($this->_oldConfig, $this->_configEnd);
if ($pos !== false) {
$this->_postConfig = substr($this->_oldConfig, $pos + strlen($this->_configEnd));
$this->_oldConfig = substr($this->_oldConfig, 0, $pos);
}
}
} else {
$this->_oldConfig = '';
}
return $this->_oldConfig;
}