Re: [PHP-DEV] Object method as handler functions in PHP4/Zend From: Zeev Suraski (zeev <email protected>)
Date: 06/30/99

At 22:35 29/06/99 , Manuel Lemos wrote:
>Hello Zeev,
>
>On 29-Jun-99 20:26:30, you wrote:
>
> >You can call an object method from outside an object in PHP 4.0, using the
> >notation of
> >classname::method().
>
> >Right now, only static strings are accepted for both the class name and the
> >method name, but we may make them dynamic so that you can this notation
> >indirectly.
>
>That's better, but I don't know if that solves the reentrancy problem. I'm
>not sure what you mean by dynamic, but I hope that means you can pass a
>string as name of a callback function and the function is called in the
>context of a user defined object of a given class. Thatr would mean that
>the $this references in the method function reference the functions of the
>class and the variables of the user defined object.

No, it doesn't mean that (I was talking about methods that don't really
have object contexts). Frankly, I'm not really sure what you're after.
You can pass that function a 'pointer' to an object, and a method name, and
call $object->$method(). I think you could do that in PHP 3.0, but if you
couldn't, you can do it using PHP 4.0.

Zeev

--
Zeev Suraski   <zeev <email protected>>  http://www.zend.com/
For a PGP public key, finger bourbon <email protected>

-- PHP Development Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>