class Redirector (View source)

Methods

void
__construct(UrlGenerator $generator)

Create a new Redirector instance.

home(int $status = 302)

Create a new redirect response to the "home" route.

back(int $status = 302, array $headers = array(), string $fallback = false)

Create a new redirect response to the previous location.

refresh(int $status = 302, array $headers = array())

Create a new redirect response to the current URI.

guest(string $path, int $status = 302, array $headers = array(), bool $secure = null)

Create a new redirect response, while putting the current URL in the session.

intended(string $default = '/', int $status = 302, array $headers = array(), bool $secure = null)

Create a new redirect response to the previously intended location.

to(string $path, int $status = 302, array $headers = array(), bool $secure = null)

Create a new redirect response to the given path.

away(string $path, int $status = 302, array $headers = array())

Create a new redirect response to an external URL (no validation).

secure(string $path, int $status = 302, array $headers = array())

Create a new redirect response to the given HTTPS path.

route(string $route, array $parameters = array(), int $status = 302, array $headers = array())

Create a new redirect response to a named route.

action(string $action, array $parameters = array(), int $status = 302, array $headers = array())

Create a new redirect response to a controller action.

getUrlGenerator()

Get the URL generator instance.

void
setSession(Store $session)

Set the active session store.

Details

at line line 30
void __construct(UrlGenerator $generator)

Create a new Redirector instance.

Parameters

UrlGenerator $generator

Return Value

void

at line line 41
RedirectResponse home(int $status = 302)

Create a new redirect response to the "home" route.

Parameters

int $status

Return Value

RedirectResponse

at line line 54
RedirectResponse back(int $status = 302, array $headers = array(), string $fallback = false)

Create a new redirect response to the previous location.

Parameters

int $status
array $headers
string $fallback

Return Value

RedirectResponse

at line line 68
RedirectResponse refresh(int $status = 302, array $headers = array())

Create a new redirect response to the current URI.

Parameters

int $status
array $headers

Return Value

RedirectResponse

at line line 82
RedirectResponse guest(string $path, int $status = 302, array $headers = array(), bool $secure = null)

Create a new redirect response, while putting the current URL in the session.

Parameters

string $path
int $status
array $headers
bool $secure

Return Value

RedirectResponse

at line line 98
RedirectResponse intended(string $default = '/', int $status = 302, array $headers = array(), bool $secure = null)

Create a new redirect response to the previously intended location.

Parameters

string $default
int $status
array $headers
bool $secure

Return Value

RedirectResponse

at line line 114
RedirectResponse to(string $path, int $status = 302, array $headers = array(), bool $secure = null)

Create a new redirect response to the given path.

Parameters

string $path
int $status
array $headers
bool $secure

Return Value

RedirectResponse

at line line 129
RedirectResponse away(string $path, int $status = 302, array $headers = array())

Create a new redirect response to an external URL (no validation).

Parameters

string $path
int $status
array $headers

Return Value

RedirectResponse

at line line 142
RedirectResponse secure(string $path, int $status = 302, array $headers = array())

Create a new redirect response to the given HTTPS path.

Parameters

string $path
int $status
array $headers

Return Value

RedirectResponse

at line line 156
RedirectResponse route(string $route, array $parameters = array(), int $status = 302, array $headers = array())

Create a new redirect response to a named route.

Parameters

string $route
array $parameters
int $status
array $headers

Return Value

RedirectResponse

at line line 172
RedirectResponse action(string $action, array $parameters = array(), int $status = 302, array $headers = array())

Create a new redirect response to a controller action.

Parameters

string $action
array $parameters
int $status
array $headers

Return Value

RedirectResponse

at line line 205
UrlGenerator getUrlGenerator()

Get the URL generator instance.

Return Value

UrlGenerator

at line line 216
void setSession(Store $session)

Set the active session store.

Parameters

Store $session

Return Value

void