clear_assign_all() -- deprecate?
boots <[email protected]>
| Newsgroups | gmane.comp.php.smarty.devel |
|---|---|
| Message-ID | <[email protected]> |
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
--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php