Re: [SMARTY] var_dump($smarty)
| From: | Mark Rogers | Date: | Tue, 13 Aug 2002 15:32:51 +0000 |
| Subject: | Re: [SMARTY] var_dump($smarty) | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5681@lists.php.net to get a copy of this message | ||
> function smarty_function_dump_smarty($params, &$smarty)
> {
> ob_start();
> var_dump($smarty);
> $ob = ob_get_contents();
> ob_end_clean();
> return "<pre>$ob</pre>";
> }
>
> drop this in your plugins dir.
Unless I'm missing something, this will dump the $smarty object not the
reserved var. It won't include (eg) the $smarty.foreach / $smarty.section
stuff, or the other vars (get, post, server vars were mentioned here
recently).
[foreach/section stuff is going to be tricky anyway because it's context
based and meaningless unless looked at inside a loop, so I'm not really
expecting that.]
PS: The above is pretty close to my first stab at this, too :-)
Mark Rogers, Quarella Ltd