src/Budkit/Application/Instance.php
protected function createRequestFromGlobals()
    {
        $_ATTRIBUTES = array_merge([], isset($_SESSION) ? $_SESSION : []);

        $SERVER = $_SERVER;

        if (isset($_POST["_method"])) {
            //Hack to allow PATCH, DELETE, OPTIONS etc!
            $SERVER['REQUEST_METHOD'] = $_POST["_method"];
        }

        return new Http\Request($_GET, $_POST, $_ATTRIBUTES, $_COOKIE, $_FILES, $SERVER);
    }
protected function createRequestFromGlobals()
    {
        $_ATTRIBUTES = array_merge([], isset($_SESSION) ? $_SESSION : []);

        $SERVER = $_SERVER;

        if (isset($_POST["_method"])) {
            //Hack to allow PATCH, DELETE, OPTIONS etc!
            $SERVER['REQUEST_METHOD'] = $_POST["_method"];
        }

        return new Http\Request($_GET, $_POST, $_ATTRIBUTES, $_COOKIE, $_FILES, $SERVER);
    }
protected function createRequestFromGlobals ( ) { $ _ATTRIBUTES = array_merge ( [ ] , isset ( $ _SESSION ) ? $ _SESSION : [ ] ) ; $ SERVER = $ _SERVER ; if ( isset ( $ _POST [ "_method" ] ) ) { //Hack to allow PATCH, DELETE, OPTIONS etc! $ SERVER [ 'REQUEST_METHOD' ] = $ _POST [ "_method" ] ; } return new Http \ Request ( $ _GET , $ _POST , $ _ATTRIBUTES , $ _COOKIE , $ _FILES , $ SERVER ) ; }
Creates an Http\Request object

- Captures global request variables `$_ENV`, `$_SESSION`, `$_SERVER`, `$_POST`, `$_GET`, `$_COOKIE`, `$_FILES`.
- These global variables (except `$_POST`) are sanitized, then destroyed by the created Request object.

*Hint: To handle non HTTP Request, fork this class and overwrite this method*

//1. Fork this class;
use Budkit\Application;
class myApplication extends Application\Instance{
//Must return an object of kind Budkit/Protocol/Request
protected function createRequestFromGlobals(){
//Return your custom Request object
}
}
//2. Then use as follows
$app = new myApplication();
$app->execute();

@return \Budkit\Protocol\Http\Request [#](?file=Budkit/Protocol/Http/Request.php)
Creates an Http \ Request object