Re: [SMARTY] Calling object methods

"messju mohr" <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Message-ID <20050616161901.GW14289@dune>
On Thu, Jun 16, 2005 at 09:15:39AM -0700, Joe Stump wrote:
> What you're doing only works under PHP5. You can't do $foo->bar()- 
> >display() in PHP4. That being said, if you ARE running PHP5 this  
> should work just fine and, if it's not, then you've most likely found  
> a bug.

yes, this works in php5, but not in a smarty template.
 
> --Joe
> 
> On Jun 15, 2005, at 6:28 PM, Garret Heaton wrote:
> 
> >Is there a way to call a method on an object returned from another  
> >method in Smarty?
> >
> >I'm trying to do: {$obj->getSomeObject()->getSomeString()} but it  
> >can't understand it. Is there any way to get around this. I want to  
> >avoid calling getSomeObject() before loading the template so that  
> >things are cleaner.
> >
> >Thanks,
> >Garret
> >
> >
> 
> -- 
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.