Actually, a careful reading of the docs reveals the following at the bottom
of each xml_set_*_handler section:

"Note: Instead of a function name, an array containing an object reference
and a method name can also be supplied."

-Clay


> From: Analysis & Solutions <[EMAIL PROTECTED]>
> Date: Wed, 3 Jul 2002 13:14:34 -0400
> To: PHP List <[EMAIL PROTECTED]>
> Subject: Re: [PHP] $this in an XML data handler ... in a class
> 
> Clay:
> 
> On Wed, Jul 03, 2002 at 02:20:56AM -0700, Clay Loveless wrote:
>> 
>>         xml_set_element_handler(
>>             $this->xmlparser,
>>             array($this,"_xml_start_element"),
>>             array($this,"_xml_end_element"));
>>         xml_set_character_data_handler(
>>             $this->xmlparser,
>>             array($this,"_xml_character_data"));
> 
> Without getting into all of the other potential issues in your code, allow
> me to quickly point out that the function name parameters to the
> set_*_handler() are supposed to be strings.  The string is to be the name
> of the function.  So, for example, do this:
> 
> xml_set_character_data_handler($this->xmlparser, '_xml_character_data');
> 
> Now, I'm not guaranteeing this will cause the function to become part of
> the class, but at least the function will be properly initiated.
> 
> --Dan


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to