You are here

public static function RedirectResponse::create in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/RedirectResponse.php \Symfony\Component\HttpFoundation\RedirectResponse::create()

Factory method for chainability.

Example:

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

Parameters

mixed $content The response content, see setContent():

int $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 vendor/symfony/http-foundation/Tests/RedirectResponseTest.php

File

vendor/symfony/http-foundation/RedirectResponse.php, line 52

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);
}