Re: [SMARTY-DEV] Problems with modifiers and objects

From: Date: Wed, 12 Feb 2003 17:51:00 +0000
Subject: Re: [SMARTY-DEV] Problems with modifiers and objects
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-679@lists.php.net to get a copy of this message
Actually this could be supported if we don't allow modifiers on object parameters. Does anyone see a practical reason to support it? If we don't allow the modifiers, then we can support what you're asking. So we make a choice, either support objects as parameters to modifiers: {$foo|bar:$foo->bar} or support modifiers on object parameters: {$foo->bar($foo|bar,$foobar|foo|bar)} We can't have both, because regex does not work with recursion. Monte On Tue, 2003-02-11 at 17:50, David Heinemeier Hansson wrote: > This construct: > > {$form->lastModified->toString()|default:$form->created->toString()} > > Produces this error: > > Fatal error: Smarty: [in form/showForm.html line 22]: syntax error: > unrecognized tag: > $form->lastModified->toString()|default:$form->created->toString() > (Smarty_Compiler.class.php, line 381) in > /Smarty-2.4.2/Smarty_Compiler.class.php on line 1857 > > Where's this is fine: > > {$form->lastModified->toString()|default:"works!"} > > Clues? > -- > David -- Monte Ohrt <monte@ispi.net>

« previous php.smarty.dev (#679) next »