You are here: Re: [SMARTY] Calling object methods « Smarty Templates Posts « IT news, forums, messages
Re: [SMARTY] Calling object methods

Posted by boots on 06/16/05 19:35

--- Joe Stump <joe@joestump.net> wrote:
> If that's the case I'd file a bug report. If you're running Smarty
> under PHP5 this should work fine I would think - at least I'd expect
> it to.

Why? Nowhere in the Smarty docs is it suggested that this is possible.
Smarty is PHP4 library and it inherits PHP4's biases.

xo boots

> --Joe
>
> On Jun 16, 2005, at 9:19 AM, messju mohr wrote:
>
> > 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация