PHP Class Illuminate\Routing\Redirector

Afficher le fichier Open project: illuminate/routing Class Usage Examples

Protected Properties

Свойство Type Description
$generator UrlGenerator The URL generator instance.
$session Illuminate\Session\Store The session store instance.

Méthodes publiques

Méthode 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.

Méthodes protégées

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

Method Details

__construct() public méthode

Create a new Redirector instance.
public __construct ( UrlGenerator $generator ) : void
$generator UrlGenerator
Résultat void

action() public méthode

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
Résultat Illuminate\Http\RedirectResponse

away() public méthode

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
Résultat Illuminate\Http\RedirectResponse

back() public méthode

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
Résultat Illuminate\Http\RedirectResponse

createRedirect() protected méthode

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

getUrlGenerator() public méthode

Get the URL generator instance.
public getUrlGenerator ( ) : UrlGenerator
Résultat UrlGenerator

guest() public méthode

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
Résultat Illuminate\Http\RedirectResponse

home() public méthode

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

intended() public méthode

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
Résultat Illuminate\Http\RedirectResponse

refresh() public méthode

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

route() public méthode

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
Résultat Illuminate\Http\RedirectResponse

secure() public méthode

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
Résultat Illuminate\Http\RedirectResponse

setSession() public méthode

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

to() public méthode

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
Résultat Illuminate\Http\RedirectResponse

Property Details

$generator protected_oe property

The URL generator instance.
protected UrlGenerator,Illuminate\Routing $generator
Résultat UrlGenerator

$session protected_oe property

The session store instance.
protected Store,Illuminate\Session $session
Résultat Illuminate\Session\Store