PHP Trait Sentinel\Traits\SentinelRedirectionTrait

Show file Open project: rydurham/sentinel

Public Methods

Method Description
extractParameters ( $specifications, $payload ) : array Extract URL data from the payload
generateUrl ( array $direction, array $payload = [] ) : string | null Generate URL from an array found in the config file
redirectBack ( $message, $payload = [] ) Redirect back to the previous page.
redirectTo ( $key, array $message = [], array $payload = [] ) : Response Redirect the browser to the appropriate location, based on config options
redirectViaResponse ( $key, Sentinel\DataTransferObjects\BaseResponse $response ) : Response Use a ResponseObject to generate a browser redirect, based on config options

Method Details

extractParameters() public method

Extract URL data from the payload
public extractParameters ( $specifications, $payload ) : array
$specifications
$payload
return array

generateUrl() public method

Generate URL from an array found in the config file
public generateUrl ( array $direction, array $payload = [] ) : string | null
$direction array
$payload array
return string | null

redirectBack() public method

Redirect back to the previous page.
public redirectBack ( $message, $payload = [] )
$message
$payload

redirectTo() public method

Redirect the browser to the appropriate location, based on config options
public redirectTo ( $key, array $message = [], array $payload = [] ) : Response
$key
$message array
$payload array
return Response

redirectViaResponse() public method

Use a ResponseObject to generate a browser redirect, based on config options
public redirectViaResponse ( $key, Sentinel\DataTransferObjects\BaseResponse $response ) : Response
$key
$response Sentinel\DataTransferObjects\BaseResponse
return Response