Skip to content
This repository has been archived by the owner on Mar 30, 2018. It is now read-only.

Miao\Office\Request #39

Closed
deeravenger opened this issue Sep 1, 2013 · 0 comments
Closed

Miao\Office\Request #39

deeravenger opened this issue Sep 1, 2013 · 0 comments

Comments

@deeravenger
Copy link

public function __construct(array $data = null)
{
    $this->_method = isset($_SERVER['REQUEST_METHOD']) ? strtoupper($_SERVER['REQUEST_METHOD']) : 'GET';
    $this->resetVars($data);
}

public function resetVars(array $data = null)
{
    $method = $this->_method;
    if ($method == 'HEAD') {
        $method = 'GET';
    }
    if (is_null($data)) {
        $this->_vars = $GLOBALS['_' . $method];
        $this->_vars = array_merge_recursive($this->_vars, $_FILES);
    }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant