Re: Class methods for custom functions
| From: | Ivo Jansch | Date: | Wed, 05 Dec 2001 08:25:26 +0000 |
| Subject: | Re: Class methods for custom functions | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2140@lists.php.net to get a copy of this message | ||
Hello Andrei,
Andrei Zmievski wrote:
That might not be possible. For example, right now we call the custom functions directly by using $func(..) construct. If we want to use class methods we'll have to switch to a wrapper function that accepts a serialized representation of the closure, unserializes it and then uses call_user_func() to invoke it.Why this serialize/unserialize and call_user_func? Can't you just compile it to: $obj->$func(..) ? Greetings, Ivo -- Ivo Jansch <ivo@ibuildings.nl> ibuildings.nl BV - information technology http://www.ibuildings.nl