Re: Pass Smarty reference to modifiers

Dmitry Koteroff <[email protected]>
Newsgroups gmane.comp.php.smarty.devel
Message-ID <[email protected]>
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.

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.