Re: Pass Smarty reference to modifiers

From: Date: Wed, 02 Jun 2004 15:13:47 +0000
Subject: Re: Pass Smarty reference to modifiers
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2383@lists.php.net to get a copy of this message
Oh, sorry - modifier functions gets variable number of argiments. Forget about that all, silly proposal. DK> Hello. DK> Smarty.class.php, line 1696. DK> function _run_mod_handler() DK> { DK> ... DK> foreach ($_var as $_key => $_val) { DK> $_args[0] = $_val; DK> $_var[$_key] = DK> call_user_func_array($_func_name, $_args); DK> } DK> ... DK> } DK> Why not to pass $this to modifier function? It's easy and DK> back-compatible: DK> call_user_func_array($_func_name, $_args, &$this); -- Best regards, Dmitry Koteroff.

« previous php.smarty.dev (#2383) next »