LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: boots Date: Thu Jan 3 07:24:29 2008 Subject: Re: [SMARTY-DEV] Chained method calls
In terms of syntax/semantics, I still think this leads to a poor way of building templates; similarly, I don't think var-vars add useful machinery to template syntax/semantics and I hope that despite many requests, we don't consider adding such a "feature". Yes, PHP allows it. It makes it easier to submit application variables to templates for raw usage. Neither of those seem to me to be good arguments for the inclusion of chained method calls. What I see this as is just another way for application programmers to download complexity into templates so that they can reduce the amount of code they have to write to interface with the templates. At least, that's what it looks like from my little pigeon hole. I'm personally -1, but I'm too tired to continue trying to convince anyone regarding this :) boots --- messju mohr <messju@lammfellpuschen.de> wrote: > I'm +1 for adding this, too. I know the reason this was not added to > Smarty is, that this does not work under php4. Smarty would generate > broken php code under php4 when doing {$foo->bar()->baz()}. > > I don't think that the possible impact on php4 is such a big > deal. Some template code that did not compile before (Smarty syntax > error) does now throw a php syntax error. But the benefits for php5 > are there - and counting the number of requests for this feature the > demand seems high. > > greetings > messju > > On Sun, Dec 09, 2007 at 01:27:50PM -0200, Diego Feitosa wrote: > > Hi all, > > > > Today, working with Smarty, I realized that a simple feature (chained > > method calls) was not present... Hopefully, after 2 minutes searching at > > google, I found this patch: > > http://codepoets.co.uk/smarty_chained_function_calls > > > > Is there any possibility to include this patch into the engine?? > > I think this will be very usefull :) > > > > I don't know how much impact this can bring to the entire distribution, > > but at least here, there's no negative impact. > > > > Thanks!! > > -- > > Diego Feitosa > > www.dnfeitosa.com <http://www.dnfeitosa.com> > > -- > Smarty Development Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
| Navigate in group php.smarty.dev at sever news.php.net | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by PHP Developer
Powered By PHP Consultants |