You are here

private static function Request::createRequestFromFactory in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/Request.php \Symfony\Component\HttpFoundation\Request::createRequestFromFactory()
2 calls to Request::createRequestFromFactory()
Request::create in vendor/symfony/http-foundation/Request.php
Creates a Request based on a given URI and configuration.
Request::createFromGlobals in vendor/symfony/http-foundation/Request.php
Creates a new request with values from PHP's super globals.

File

vendor/symfony/http-foundation/Request.php, line 1901

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

private static function createRequestFromFactory(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) {
  if (self::$requestFactory) {
    $request = call_user_func(self::$requestFactory, $query, $request, $attributes, $cookies, $files, $server, $content);
    if (!$request instanceof self) {
      throw new \LogicException('The Request factory must return an instance of Symfony\\Component\\HttpFoundation\\Request.');
    }
    return $request;
  }
  return new static($query, $request, $attributes, $cookies, $files, $server, $content);
}