Re: Calling original function from an overloaded function
| From: | Alexey Zakhlestin | Date: | Tue, 10 Jun 2008 04:56:25 +0000 |
| Subject: | Re: Calling original function from an overloaded function | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-38125@lists.php.net to get a copy of this message | ||
Well, speaking in broad terms, I would suggest to store the pointer to
original function before overloading it, and calling that, when you
need it
On 6/10/08, Christoph Dorn <christoph@christophdorn.com> wrote:
> I have been looking at xdebug and have figured out how to overload a
> function. As a test I have overloaded the var_dump function.
>
> Now how do I call the original var_dump function from my implementation?
> Borrowing from OO terminology I have subclassed the var_dump method, now
> I want to call parent::var_dump() from my subclass.
>
> Also how does overloading work when two extensions overload the same
> function? Can this be done? Is there some sort of order? Can I let the
> other extension overload the function and then overload the function
> from the other extension?
>
> Any pointers would be greatly appreciated.
>
> Thanks
>
> Christoph
>
>
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Alexey Zakhlestin
http://blog.milkfarmsoft.com/