Re: Object-oriented $_REQUEST?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



""Buesching, Logan J"" <ljbuesch@xxxxxxxxxx> schrieb im Newsbeitrag 
news:1FD02EA2D6CD404E9FD7E866C19714D43EDE9B@xxxxxxxxxxxxxxxxxxxx
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:ebgssth@xxxxxxxxx]
> Sent: Saturday, April 28, 2007 2:56 PM
> To: php-general@xxxxxxxxxxxxx
> Subject:  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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux