Re: [SMARTY] Method Request
| From: | Monte Ohrt | Date: | Thu, 20 Feb 2003 20:00:17 +0000 |
| Subject: | Re: [SMARTY] Method Request | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8041@lists.php.net to get a copy of this message | ||
On Thu, 2003-02-20 at 13:46, Tom Sommer wrote:
> On 20 Feb 2003 13:44:24 -0600, Monte Ohrt wrote:
>
> > We already have get_template_vars() that just returns a reference to the
> > entire array. I wonder if we could expand that.
> >
> > example:
> >
> > $smarty->get_template_vars('varname');
> > $smarty->get_template_vars('varname','config');
> >
> > The first one gets the value of assigned var "varname", the second gets
> > the value of assigned config file var "varname".
>
>
> $smarty->get_config_vars('SQL-password');
>
> why is it called _vars and not _var ;)
Probably because its original intention was just to get all the vars. I
didn't write it either :D
It does return a reference though, not a copy. So if you get a var and
change it, the value of the assigned var will change as well. Expected
behavior?
Monte