Date: 06/29/99
- Next message: Brian Schaffner: "RE: [PHP-DEV] overloading JNI return values"
- Previous message: jim: "[PHP-DEV] CVS update: php3/functions"
- In reply to: Andrey Zmievski: "Re: [PHP-DEV] Object method as handler functions in PHP4/Zend"
- Next in thread: Manuel Lemos: "Re: [PHP-DEV] Object method as handler functions in PHP4/Zend"
- Reply: Manuel Lemos: "Re: [PHP-DEV] Object method as handler functions in PHP4/Zend"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
Zeev
At 15:39 29/06/99 , Andrey Zmievski wrote:
>Manuel Lemos wrote:
> > Unfortunately, some core PHP functions take names of global functions
> > parameters for callback handlers. I say unfortunately because sometimes I
> > need to have a callback function to call a method of a given object, and
>since
> > currently there is no way to specify a object method as call back handler
> > function, I have to use a global stub function.
> >
> > This is not good because I need have access to context that is provided by
> > the object, so I have resort to global variables. For those that question
> > it, global variables are not bad just because a programming teached said
> > so, but because:
>
>Good call, Manuel. This is exactly the kind of functionality I also wished
>we had in PHP.
>
>-Andrey
>* 2 + 2 = 5 for extremely large values of 2. *
-- 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>
- Next message: Brian Schaffner: "RE: [PHP-DEV] overloading JNI return values"
- Previous message: jim: "[PHP-DEV] CVS update: php3/functions"
- In reply to: Andrey Zmievski: "Re: [PHP-DEV] Object method as handler functions in PHP4/Zend"
- Next in thread: Manuel Lemos: "Re: [PHP-DEV] Object method as handler functions in PHP4/Zend"
- Reply: Manuel Lemos: "Re: [PHP-DEV] Object method as handler functions in PHP4/Zend"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

