object-callbacks for plugins
| From: | messju mohr | Date: | Tue, 15 Apr 2003 10:47:54 +0000 |
| Subject: | object-callbacks for plugins | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-1154@lists.php.net to get a copy of this message | ||
hello smarty-dev.
2.5.0 is final so i think it's time to break some things... :)
i just committed a patch that allow function callbacks to be
registered as methods-callbacks.
example:
$smarty->register_function('foo', array(&$this, 'foo'));
or
$smarty->register_output_filter('tidy', array(&$obj, 'tidy'));
i took the chance and slighlty changed the scheme how calls to
plugin-functions are resolved. before the function-names where
resolved at template-execution-time. now they are resolved at
compile-time. this should only be problematic in the most obscure
cases, and has been tested heavily by me without problems.
nontheless: don't hesitate to report any slightest problems you have
with these modifications. do this on smarty-dev or mail me.
have fun
messju