clear_assign_all() -- deprecate?
| From: | boots | Date: | Sat, 13 Mar 2004 21:23:10 +0000 |
| Subject: | clear_assign_all() -- deprecate? | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-2197@lists.php.net to get a copy of this message | ||
Hi all.
I was wondering if anyone uses clear_assign_all() as it looks like it
can be deprecated if clear_assign() is modified to implicitly perform
the task of clear_assign_all() when no paramaters are given. Perhaps as
follows:
function clear_assign($tpl_var=array())
{
if (is_array($tpl_var) && !empty($tpl_var)) {
foreach ($tpl_var as $curr_var)
unset($this->_tpl_vars[$curr_var]);
} elseif (empty($tpl_var)) {
unset($this->_tpl_vars[$tpl_var]);
} else {
unset($this->_tpl_vars[$tpl_var]);
}
}
One less function point.
xo boots
__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com