fuel/core — pull request #988 by tgriesser (2012-05-27 20:22:27+00:00)
Title: Request superglobal overrides for HMVC requests

Some proposed additions I was talking through with @jschreuder, which allow HMVC requests to specifically set and override `server, cookie, get, post, put, delete, json, xml` at the request level, in the same way that `set_method()` currently works:

Simulating ajax post request:

```php

Request::forge('path/to/controller')
->set_method('POST')
->set('post', array('var' => 'value'))
->set('server', array(
'HTTP_X_REQUESTED_WITH' => 'xmlhttprequest'
), true)
->execute();

```

The new method `->set($type, $arr, $inherit_values)` would determine which item to set, with values, and whether values from the main request are inherited.

`Input::all()` and `Input::param()` will still reference the main request's globals, but all other Input methods (`Input::server()`, `Input::post()` etc.) will check the request, and use the override if one is provided, defaulting to the main request input items.