Neos\Flow\Http\Request::__construct PHP Метод

__construct() публичный Метод

Constructs a new Request object based on the given environment data.
См. также: create()
См. также: createFromEnvironment()
public __construct ( array $get, array $post, array $files, array $server )
$get array Data similar to that which is typically provided by $_GET
$post array Data similar to that which is typically provided by $_POST
$files array Data similar to that which is typically provided by $_FILES
$server array Data similar to that which is typically provided by $_SERVER
    public function __construct(array $get, array $post, array $files, array $server)
    {
        $this->headers = Headers::createFromServer($server);
        $this->setAttribute(self::ATTRIBUTE_CLIENT_IP, isset($server['REMOTE_ADDR']) ? $server['REMOTE_ADDR'] : null);
        $method = isset($server['REQUEST_METHOD']) ? $server['REQUEST_METHOD'] : 'GET';
        if ($method === 'POST') {
            if (isset($post['__method'])) {
                $method = $post['__method'];
            } elseif (isset($server['HTTP_X_HTTP_METHOD_OVERRIDE'])) {
                $method = $server['HTTP_X_HTTP_METHOD_OVERRIDE'];
            } elseif (isset($server['HTTP_X_HTTP_METHOD'])) {
                $method = $server['HTTP_X_HTTP_METHOD'];
            }
        }
        $this->setMethod($method);
        $protocol = isset($server['SSL_SESSION_ID']) || isset($server['HTTPS']) && ($server['HTTPS'] === 'on' || strcmp($server['HTTPS'], '1') === 0) ? 'https' : 'http';
        $host = isset($server['HTTP_HOST']) ? $server['HTTP_HOST'] : 'localhost';
        $requestUri = isset($server['REQUEST_URI']) ? $server['REQUEST_URI'] : '/';
        if (substr($requestUri, 0, 10) === '/index.php') {
            $requestUri = '/' . ltrim(substr($requestUri, 10), '/');
        }
        $this->uri = new Uri($protocol . '://' . $host . $requestUri);
        if (isset($server['SERVER_PORT'])) {
            $this->uri->setPort($server['SERVER_PORT']);
        }
        $this->server = $server;
        $this->arguments = $this->buildUnifiedArguments($get, $post, $files);
    }