Re: [SMARTY-DEV] objects: one more approach
| From: | Monte Ohrt | Date: | Thu, 16 Jan 2003 16:55:33 +0000 |
| Subject: | Re: [SMARTY-DEV] objects: one more approach | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-557@lists.php.net to get a copy of this message | ||
We can make a property that sets the default behavior. My only
reservation about it would be template portability, but that probably
won't be a typical case.
Monte
On Thu, 2003-01-16 at 10:46, Nick Charsley wrote:
> MO> Maybe another reserved parameter name:
> MO>
> MO> {$foo->bar p1="foo" p2 = "bar" wrapper=true}
> MO>
> MO> This would cause the parameter order to be important, and pass them to
> MO> the object in that order. Otherwise it uses the Smarty object format.
> >
> I like this a lot, but it would be useful if the default wrapper behaviour
> could be set in the smarty object, mainly because I see the choice between
> 'smarty argument' passing and 'object order' passing as being made by the
> php programmer who will then tell the template designer, who may get a
> little frustrated that they keep having to stick 'wrapper=true' onto every
> object function call. I would expect that if a programmer is going to want
> to provide an object API to the designer they will either be constant, or
> one way will dominate, they will then be able to set the global default to
> wrapper true or false and tell the designer in the documentation which calls
> need to explicitly set wrapper.
>
> I suppose it's because I would favour it to default the opposite way to
> Monte, and as I write the templates I just don't want to put wrapper=true
> everywhere :)
>
> Nick (c)
--
Monte Ohrt <monte@ispi.net>