Re: [SMARTY] var_dump($smarty)

From: Date: Tue, 13 Aug 2002 15:40:20 +0000
Subject: Re: [SMARTY] var_dump($smarty)
References: 1 2 3 4  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5682@lists.php.net to get a copy of this message
> From: "Mark Rogers" <mark@quarella.co.uk> > To: "Roman Neuhauser" <neuhauser@bellavista.cz>, > "smarty" <smarty-general@lists.php.net> > Subject: Re: [SMARTY] var_dump($smarty) > Date: Tue, 13 Aug 2002 16:32:51 +0100 > > > 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. sorry, i misread your message. but, you know, you could've tried e. g. this on your own: function smarty_function_dump_smarty($params, &$smarty) { $smarty_var = $smarty->get_template_vars(); $smarty_var = $smarty_var['smarty']; ob_start(); var_dump($smarty_var); $ob = ob_get_contents(); ob_end_clean(); return "<pre>$ob</pre>"; } (this version wasn't tested either) -- FreeBSD 4.6-STABLE 5:34PM up 4 days, 5:29, 14 users, load averages: 0.00, 0.00, 0.00

« previous php.smarty.general (#5682) next »