[Shadow] Add request and superglobal value parsing to CliRequest class

Review Request #235 — Created Nov. 2, 2013 and submitted — Latest diff uploaded

pprkut
Lunr
master
236
lunr
This adds request and superglobal value parsing to the CliRequest class. With this it is now possible to "fake" web requests from the command line.

An example request could look like this:

php ./index.php --controller=facebook --method=get_login_url --post=app_id=abcd\&app_secret=secret\&scope=email

or

php ./index.php -c facebook -m get_login_url --post=app_id=abcd\&app_secret=secret\&scope=email

POST/GET/COOKIE are here implemented as one query string, it is possible to change this so you have to specify every parameter separately, like:

php ./index.php -c facebook -m get_login_url --post=app_id=abcd --post=app_secret=secret --post=scope=email

Not sure which option would be prefered.
Unit Tests, Implementation for Virus
Loading...