function __construct($filename = null, $type = 'xml') { $this->type = $type; $conf = new Config(); if (!is_null($filename)) { //$filename = "notthere.conf"; $this->rootObj = @$conf->parseConfig($filename, $type); if (PEAR::isError($this->rootObj)) { print "message: " . $this->rootObj->getMessage() . "\n"; print "code: " . $this->rootObj->getCode() . "\n\n"; print "Backtrace:\n"; foreach ($this->rootObj->getBacktrace() as $caller) { print_r($caller); print $caller['class'] . $caller['type']; print $caller['function'] . "() "; print "line " . $caller['line'] . "\n"; } die; } //print get_class( $this->rootObj )."\\\\ \n";; } else { $this->rootObj = new Config_Container('section', 'config'); $conf->setroot($this->rootObj); } }
function __construct($filename = null, $type = 'xml') { $this->type = $type; $conf = new Config(); if (!is_null($filename)) { $this->rootObj = $conf->parseConfig($filename, $type); } else { $this->rootObj = new Config_Container('section', 'config'); $conf->setroot($this->rootObj); } }