/** * Function: PConfigFile, the constructor * * @param string $strPath, the path to the config file * @param string $fileDescr, the string to the path of config file that defines de default values or the pconfigfile object * */ function PConfigFile($strPath, $fileDescr = false) { parent::PTextFile($strPath); if (is_string($fileDescr) && is_file($fileDescr)) { //do not parse again the config file if ($fileDescr == CONFIG_FILE) { global $configFile; if (isset($configFile)) { $this->oConfigfileDescr =& $configFile; } else { $this->oConfigfileDescr = new PConfigFile($fileDescr, false); } } else { $this->oConfigfileDescr = new PConfigFile($fileDescr, false); } } else { $this->oConfigfileDescr = $fileDescr; } $this->tabParams = array(); $this->tabParamsDescr = array(); }
function PPage($strPath) { parent::PTextFile($strPath); $this->oPConfigFile = new PConfigFile(dirname($this->path) . SLASH . basename($this->getNameWithoutExt()) . ".ini", CONFIG_FILE); $this->oCatParent = new PDirCategory($this->getParentPath()); }