Re: [SMARTY-DEV] Compiler Code cleanup - new syntax features
| From: | Monte Ohrt | Date: | Wed, 18 Dec 2002 17:37:08 +0000 |
| Subject: | Re: [SMARTY-DEV] Compiler Code cleanup - new syntax features | ||
| References: | 1 2 3 4 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-443@lists.php.net to get a copy of this message | ||
I like that approach too.
On Wed, 2002-12-18 at 11:34, Hans Lellelid wrote:
> I really like the $smarty.const._MY_CONST idea. It would be consistent
> with the fact that super-globals (like $_SERVER) are only accessible
> through $smarty array (like $smarty.server), right? It would solve my
> "problem" of wanting direct access also.
>
> Hans
>
> Monte Ohrt wrote:
>
> >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)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>