Re: How to use class methods in callback ?

From: Date: Sun, 11 Nov 2001 23:45:13 +0000
Subject: Re: How to use class methods in callback ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-74199@lists.php.net to get a copy of this message
array_filter($array, array(&$object_variable, 'methodname')); you can pass an array to 2nd argument which encapsulates the handling object (above just a reference to it) and a string containing the name of callback method. ----- Original Message ----- From: "Andrew Kirilenko" <icedank@gmx.net> To: <php-general@lists.php.net> Cc: "Ravi Ranganathan" <rrangan@cisco.com> Sent: Sunday, November 11, 2001 8:05 PM Subject: RE: [PHP] How to use class methods in callback ? > Hello! > > Try to use $instance_name and $method_name variables and make such calls: > $$instance_name->$method_name(); > > Best regards, > Andrew Kirilenko. > > > -----Original Message----- > > From: Ravi Ranganathan [mailto:rrangan@cisco.com] > > Sent: Sunday, November 11, 2001 8:49 PM > > To: php-general@lists.php.net > > Subject: [PHP] How to use class methods in callback ? > > > > > > Hi, > > Can I specify a class method as a callback when using > > array_filter. I tried > > "classname::methodname" and it gave a parser error. Is it supported ? > > > > Ravi > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#74199) next »