PHP Class Illuminate\Routing\Redirector

Mostrar archivo Open project: illuminate/routing Class Usage Examples

Protected Properties

Property Type Description
$generator UrlGenerator The URL generator instance.
$session Illuminate\Session\Store The session store instance.

Public Methods

Method Description
__construct ( UrlGenerator $generator ) : void Create a new Redirector instance.
action ( string $action, array $parameters = [], integer $status = 302, array $headers = [] ) : Illuminate\Http\RedirectResponse Create a new redirect response to a controller action.
away ( string $path, integer $status = 302, array $headers = [] ) : Illuminate\Http\RedirectResponse Create a new redirect response to an external URL (no validation).
back ( integer $status = 302, array $headers = [], string $fallback = false ) : Illuminate\Http\RedirectResponse Create a new redirect response to the previous location.
getUrlGenerator ( ) : UrlGenerator Get the URL generator instance.
guest ( string $path, integer $status = 302, array $headers = [], boolean $secure = null ) : Illuminate\Http\RedirectResponse Create a new redirect response, while putting the current URL in the session.
home ( integer $status = 302 ) : Illuminate\Http\RedirectResponse Create a new redirect response to the "home" route.
intended ( string $default = '/', integer $status = 302, array $headers = [], boolean $secure = null ) : Illuminate\Http\RedirectResponse Create a new redirect response to the previously intended location.
refresh ( integer $status = 302, array $headers = [] ) : Illuminate\Http\RedirectResponse Create a new redirect response to the current URI.
route ( string $route, array $parameters = [], integer $status = 302, array $headers = [] ) : Illuminate\Http\RedirectResponse Create a new redirect response to a named route.
secure ( string $path, integer $status = 302, array $headers = [] ) : Illuminate\Http\RedirectResponse Create a new redirect response to the given HTTPS path.
setSession ( Illuminate\Session\Store $session ) : void Set the active session store.
to ( string $path, integer $status = 302, array $headers = [], boolean $secure = null ) : Illuminate\Http\RedirectResponse Create a new redirect response to the given path.

Protected Methods

Method Description
createRedirect ( string $path, integer $status, array $headers ) : Illuminate\Http\RedirectResponse Create a new redirect response.

Method Details

__construct() public method

Create a new Redirector instance.
public __construct ( UrlGenerator $generator ) : void
$generator UrlGenerator
return void

action() public method

Create a new redirect response to a controller action.
public action ( string $action, array $parameters = [], integer $status = 302, array $headers = [] ) : Illuminate\Http\RedirectResponse
$action string
$parameters array
$status integer
$headers array
return Illuminate\Http\RedirectResponse

away() public method

Create a new redirect response to an external URL (no validation).
public away ( string $path, integer $status = 302, array $headers = [] ) : Illuminate\Http\RedirectResponse
$path string
$status integer
$headers array
return Illuminate\Http\RedirectResponse

back() public method

Create a new redirect response to the previous location.
public back ( integer $status = 302, array $headers = [], string $fallback = false ) : Illuminate\Http\RedirectResponse
$status integer
$headers array
$fallback string
return Illuminate\Http\RedirectResponse

createRedirect() protected method

Create a new redirect response.
protected createRedirect ( string $path, integer $status, array $headers ) : Illuminate\Http\RedirectResponse
$path string
$status integer
$headers array
return Illuminate\Http\RedirectResponse

getUrlGenerator() public method

Get the URL generator instance.
public getUrlGenerator ( ) : UrlGenerator
return UrlGenerator

guest() public method

Create a new redirect response, while putting the current URL in the session.
public guest ( string $path, integer $status = 302, array $headers = [], boolean $secure = null ) : Illuminate\Http\RedirectResponse
$path string
$status integer
$headers array
$secure boolean
return Illuminate\Http\RedirectResponse

home() public method

Create a new redirect response to the "home" route.
public home ( integer $status = 302 ) : Illuminate\Http\RedirectResponse
$status integer
return Illuminate\Http\RedirectResponse

intended() public method

Create a new redirect response to the previously intended location.
public intended ( string $default = '/', integer $status = 302, array $headers = [], boolean $secure = null ) : Illuminate\Http\RedirectResponse
$default string
$status integer
$headers array
$secure boolean
return Illuminate\Http\RedirectResponse

refresh() public method

Create a new redirect response to the current URI.
public refresh ( integer $status = 302, array $headers = [] ) : Illuminate\Http\RedirectResponse
$status integer
$headers array
return Illuminate\Http\RedirectResponse

route() public method

Create a new redirect response to a named route.
public route ( string $route, array $parameters = [], integer $status = 302, array $headers = [] ) : Illuminate\Http\RedirectResponse
$route string
$parameters array
$status integer
$headers array
return Illuminate\Http\RedirectResponse

secure() public method

Create a new redirect response to the given HTTPS path.
public secure ( string $path, integer $status = 302, array $headers = [] ) : Illuminate\Http\RedirectResponse
$path string
$status integer
$headers array
return Illuminate\Http\RedirectResponse

setSession() public method

Set the active session store.
public setSession ( Illuminate\Session\Store $session ) : void
$session Illuminate\Session\Store
return void

to() public method

Create a new redirect response to the given path.
public to ( string $path, integer $status = 302, array $headers = [], boolean $secure = null ) : Illuminate\Http\RedirectResponse
$path string
$status integer
$headers array
$secure boolean
return Illuminate\Http\RedirectResponse

Property Details

$generator protected_oe property

The URL generator instance.
protected UrlGenerator,Illuminate\Routing $generator
return UrlGenerator

$session protected_oe property

The session store instance.
protected Store,Illuminate\Session $session
return Illuminate\Session\Store