the syntax for passing methods of static classes or objects
is
array('class', 'methdod'); // static
or
array($object, 'method'); // without and
array(&$object, 'method')) // by reference
- Markus
On Fri, Mar 22, 2002 at 04:19:42PM -0500, arti wrote :
> I am very new to PHP and have what is probably a dumb question. I am
> attempting to parse an XML document with a Class.
>
> But, you have to use "xml_set_element_handler" for this to work and that
> means you have to pass it the names of your element handlers. How do I do
> this in a class???
>
> For example, this does not work:
>
> xml_set_element_handler($parser, "this->startElementHandler",
> "this->endElementHandler");
>
> as I get this error:
>
> Warning: Unable to call handler this->startElementHandler() in
> C:\Inetpub\wwwroot\PHP\stdqclass.php on line 31
>
>
> If I remove the "this->" I get the exact same error only without the
> "this->".
>
>
> I want the class to handle the XML totally on its own, but I am cannot
> figure out how to pass the xml_set_element_handler function a reference to
> my event handlers. Can this be done from within a class and if so, how do I
> pass my event handlers?
>
> Thanks,
>
> -- Brian
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
--
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php