Re: HTTP_*_VARS acces
| From: | Tomas Sanchez Romani | Date: | Thu, 28 Jun 2001 15:34:40 +0000 |
| Subject: | Re: HTTP_*_VARS acces | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1045@lists.php.net to get a copy of this message | ||
> So, it looks like people would prefer to have one $smarty object they
> can access, but still:
>
> $smarty.request.get.x
> $smarty.request.cookies.x
>
> or
>
> $smarty.get.x
> $smarty.cookies.x
>
> ?
>
> The first way is more logical since all these vars pertain to current
> request, the second one is shorter.
>
The first way looks much better, but what happened to the mixed GET and POST
? what about having theese directly under $smarty.request?
example:
HTTP_POST_VARS["name"] == "fred"
HTTP_POST_VARS["day"] == "friday"
HTTP_GET_VARS["visit"] == 2
HTTP_GET_VARS["day"] == "saturday"
$smarty.request.name == "fred" == $smarty.request.post.name
$smarty.request.visit == 2 == $smarty_request.get.visit
$smarty.request.day == "saturday" == $smarty.request.post.day !=
$smarty.request.get.day
Post overrides Get or the otherway.
regards, tomas