Re: Re[2]: Passing in objects by reference (Pull approach w/ Smarty)

From: Date: Fri, 06 Jul 2001 15:49:32 +0000
Subject: Re: Re[2]: Passing in objects by reference (Pull approach w/ Smarty)
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1127@lists.php.net to get a copy of this message
Andrei Zmievski wrote: > > > {$tickers->fetch("YHOO")} > > Stock Name: {$ticker_name} Stock Price: {$ticker_price} > > > > (Tickers::fetch, in this case, assigns template variables using the > > Smarty API). > > I think you can already do this. If you assign $tickers to a template > and it's an object you can do: $tickers isn't an assigned template variable, fyi. It is an object in PHP. > > {php} > $tickers->fetch("YHOO"); > {/php} > > and if tickers::fetch() assigns template vars via API, they should be > available to the template. > > -Andrei >

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