Re: [SMARTY-DEV] Compiler Code cleanup - new syntax features
| From: | Monte Ohrt | Date: | Wed, 18 Dec 2002 17:28:58 +0000 |
| Subject: | Re: [SMARTY-DEV] Compiler Code cleanup - new syntax features | ||
| References: | 1 2 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-441@lists.php.net to get a copy of this message | ||
The syntax just wasn't put in, I wasn't sure how useful that would be.
You can pass a constant as a parameter though. I wonder if we should
just get rid of it and use $smarty.const._MY_CONST instead.
Monte
On Wed, 2002-12-18 at 11:24, Hans Lellelid wrote:
> Hi Monte,
>
> Sorry that I haven't been following the constants discussion closely.
> What's the thinking behind not allowing direct calls to constants? --
> this seems like soemthing that would be pretty useful (e.g. I often will
> set constants for things like SCRIPT_URI and SCRIPT_URL since the
> $_SERVER[] var can vary depending on whether using IIS or Apache etc).
>
> Hans
>
> >What is NOT allowed:
> >
> >1) direct call to constant
> >
> >won't work:
> >{_MY_CONST}
> >
> >2) objects as parameters (as discussed)
> >
> >won't work:
> >{myfunc foo=$func->bar()}
> >{$myobj->foo($blah->bar())}
> >
> >3) you cannot put modifiers on modifier parameters (obvious syntax
> >collisions)
> >
> >
> >
> >
>
--
Monte Ohrt <monte@ispi.net>