Hey Clay:
On Wed, Jul 03, 2002 at 03:25:42PM -0700, Clay Loveless wrote:
>
> Looks like your conclusion is the same as mine: the object variables are
> readable within the handler functions, but they are not writeable.
I don't think that's an accurate description. The object variables are
wr
ay
> From: Analysis & Solutions <[EMAIL PROTECTED]>
> Date: Wed, 3 Jul 2002 16:38:38 -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 11:05:34AM -0700, Clay Love
Clay:
On Wed, Jul 03, 2002 at 11:05:34AM -0700, Clay Loveless wrote:
>
> "Note: Instead of a function name, an array containing an object reference
> and a method name can also be supplied."
Interesting. Thanks!
Anyway, back to your situation. I put together a test. Two counters are
running
In a follow up on this, here's something else that's kind of bizzare ...
Within this class example, if I add a variable declaration of:
var $testval = 'this is a test';
And then add to _xml_character_data():
echo "TEST: $this->testval\n";
... I find that within the class structure, _x
TECTED]>
> 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_
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
Here's a brain-bender ... At least it is for me at the moment. : )
When I use an XML parser inside a class, the xml_*_handler functions aren't
recognizing "$this->" variables. I can kind of see why ... But would like it
to work anyway. : )
Here's an example:
class Blah
{
var $xmlparser;
7 matches
Mail list logo