Re: [SMARTY] Class::method() in if tags

From: Date: Wed, 10 Mar 2004 07:18:31 +0000
Subject: Re: [SMARTY] Class::method() in if tags
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11088@lists.php.net to get a copy of this message
Hello, > > is that of broader use? I started using it with the patch right now (thx btw). Grouping related functions in classes can help to modularize scripts, even if you don't want to use objects.. > Do we want to do this? Are template designers concerned between the > differences between class methods and object methods? If Auth is used > as a registered object (class would also work) this problem goes away > and no new syntax is introduced. I think one of the greatest things in PHP and also Smarty is the flexibility letting one solve a problem the way he wants. To cite from the manual '{if} statements in Smarty have much the same flexibility as PHP if statements', so adding support for static function calls is just a simplification and generalization. > As for derefrenced objects, the same notion applies: is there a need > to reference arbitrary positions in an object hierarchy? Is this > something that designers should be concerned about (ie. should > designers have to know the application object model or should they be > given 'simple' template tools/structure?) Personally I pass a single > "payload" to my main template and then dynamically included templates > which are passed the appropriate portions of the total payload. That > way, each template is at the "right" scope. No matter how you handle it, as said above, one should be able to choose his own way. ;) - david

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