Re: Accessing objects

From: Date: Fri, 02 Jan 2004 05:03:13 +0000
Subject: Re: Accessing objects
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9900@lists.php.net to get a copy of this message
Hello N, You can't do that in PHP 4, only in PHP 5. read the language features portion of the manual at http://www.php.net/manual/en/langref.php to answer many questions regarding PHP. Also, you should ask PHP questions on php-general, this list is for problems with PEAR packages: the error you're describing would happen with any PHP program in PHP 4. Regards, Greg N wrote:
i'm trying to access a directive in a Config object I've created: $conf = array('pear.errorHandling.mode' => PEAR_ERROR_TRIGGER,
                'pear.errorHandling.options' => E_USER_ERROR);
$config = new Config(); $appConfig =&$config->parseConfig($conf, 'phparray',array('name' => 'conf')); $errorMode=&$appConfig->getItem('directive','pear.errorHandling.mode')->getC ontent(); And I'm getting a parse error on the last line. If i do it in 2 steps, i.e: $obj=&$appConfig->getItem('directive','pear.errorHandling.mode') $errorMode=$obj->getContent(); I don't get an error. Why can't i do this all in one step?


« previous php.pear.general (#9900) next »