Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Method Chaining

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
mattejames
Smarty Rookie


Joined: 15 Jan 2008
Posts: 7

PostPosted: Tue Jan 15, 2008 4:21 pm    Post subject: Method Chaining Reply with quote

Let me start by saying that I know this has been discussed elsewhere on the forum (links in my next post since this is my first post) and I don't want to restart an old argument.

(For those who don't know what I'm talking about it looks like this: {$foo->bar()->bar()} and is not supported in the current version of Smarty.)

My only question is if someone knows the regex to add to the block located in line 144-164 in Smarty_Compiler.class.php ( version 2.6.18 ) to enable this feature. Looking at it, it seems like it should be fairly simple to add another non-captured group which says that you can repeat the regex for a method call on a function. Unfortunately, after looking at it for a while, I've gone cross-eyed. Smile

Anyone have any suggestions? I realize that this limitation is there for PHP4 compatibility and am willing to modify my copy and maintain it that way for my own use in order to get it working for me, so I'm NOT asking it to be built into the existing Smarty code base; I'll do that on my end.

Thanks for any help!


Last edited by mattejames on Wed May 05, 2010 11:16 pm; edited 2 times in total
Back to top
View user's profile Send private message
mattejames
Smarty Rookie


Joined: 15 Jan 2008
Posts: 7

PostPosted: Tue Jan 15, 2008 4:22 pm    Post subject: Links that I promised Reply with quote

Here are the links that I referred to in the post above. This BB system requires a single valid post before you can include links, so I had to include it in a separate post:

http://www.phpinsider.com/smarty-forum/viewtopic.php?t=10392&highlight=method+chaining
http://www.phpinsider.com/smarty-forum/viewtopic.php?t=3862&highlight=method+chaining
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP