Skip to content

Feature Request - getRequest() #11

@volomike

Description

@volomike

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).

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions