""Buesching, Logan J"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 
news:[EMAIL PROTECTED]
I feel that a 'request' class wouldn't be appropriate for the $_REQUEST
array.  The reason being, is that there isn't to that class other than
the $_REQUEST array, and a bunch of 'get' methods.  If this were to be
expanded upon by adding filtering user input, then it *could* be more
useful.  IMO an entire class just to handle retrieving data an array (or
4 if you include GPC and request) would become unnecessary overhead.

But then again, maybe I am missing the point of this 'request' class.

-Logan

> -----Original Message-----
> From: js [mailto:[EMAIL PROTECTED]
> Sent: Saturday, April 28, 2007 2:56 PM
> To: php-general@lists.php.net
> Subject: [PHP] Object-oriented $_REQUEST?
>
> Hi.
>
> I'm looking for implementation of request object
> that represent a request that works like this.
>
> $r = new request();
> if ($r->method == 'GET')
>     $name = $r->GET->get('name');
>     $age = $r->GET->get('age');
> else if (request.method == 'POST')
>     $name = $r->POST->get('name');
>     $age = $r->POST->get('age');
> ...
>
> Handling $_GET, $_POST directly is cumbersome for me
> so I tried to make one but I thought it's quite possible that
> some better programmer already make one like this.
>
> Thanks in advance.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to