volomike/Faster — Issue #11: Feature Request - getRequest()
Author: volomike
Created: 2011-10-15 01:05:07+00:00
State: open
Labels: Feature

Vladimir Nikolic asked if we could have another Faster_Request class method called getRequest(). It would use $_GET or $_POST, depending on whether the server received a POST request or not. Note we don't want to use $_REQUEST because it has a problem, as spelled out here:

http://devlog.info/2010/02/04/why-php-request-array-is-dangerous/

So, in a nutshell, the class method would sort of look like:

See if ($_POST). If so, then process with getPostedVar(). Otherwise, process with getVar().

I think this is a valid, very small thing to add, and which may help speed up development. I wouldn't personally use getRequest() except for testing purposes, and that's why it might help speed up development (because it speeds up testing).