public static function RedirectResponse::create

Factory method for chainability

Example:

return Response::create($body, 200) ->setSharedMaxAge(300);

Parameters

string $content The response content:

integer $status The response status code:

array $headers An array of response headers:

Return value

Response

Overrides Response::create

1 call to RedirectResponse::create()
RedirectResponseTest::testCreate in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RedirectResponse.php, line 54

Class

RedirectResponse
RedirectResponse represents an HTTP response doing a redirect.

Namespace

Symfony\Component\HttpFoundation

Code

public static function create($url = '', $status = 302, $headers = array()) {
  return new static($url, $status, $headers);
}