PHP Class Airship\Engine\AutoPilot

RESTful Routing for the Airship
Inheritance: implements Airship\Engine\Contract\RouterInterface
Afficher le fichier Open project: paragonie/airship

Méthodes publiques

Свойство Type Description
$active_cabin string
$cabinIndex string
$mypath Current request path
$path string
$patternPrefix string

Protected Properties

Свойство Type Description
$CSPBuilder ParagonIE\CSPBuilder\CSPBuilder
$cabin array
$databases Database[]
$lens Lens

Méthodes publiques

Méthode Description
__construct ( array $cabin = [], Lens $lens = null, array $databases = [] ) AutoPilot constructor.
isActiveCabinKey ( string $cabinKey = '*', boolean $https_only = false, string $scheme = '', string $activeHost = '', string $uri = '' ) : boolean Does a given cabin key match the current HTTP host, port, and path?
isHTTPSConnection ( string $scheme = '' ) : boolean Is this user currently connected over HTTPS?
makePath ( string $string ) : string Replace {token}s with their regex stand-ins.
route ( ) Actually serve the HTTP request
setActiveCabin ( array $cabin, string $prefix ) Set the active cabin
testCabinForUrl ( string $url ) : string Which Cabin does this URL belong to?
testLanding ( string $path, string $uri, array &$args = [], boolean $needsPrep = false ) : boolean Test a path against a URI

Méthodes protégées

Méthode Description
forceHTTPS ( string $scheme = '' ) : boolean Do not allow insecure HTTP request to proceed
loadInjectedRoutes ( ) : self See Gadgets::injectRoutes()
serve ( array $route, array $args = [] ) : mixed Actually serve the routes. Called by route() above.
serveFallback ( ) : mixed This serves the fallback route, if it's defined.

Method Details

__construct() public méthode

AutoPilot constructor.
public __construct ( array $cabin = [], Lens $lens = null, array $databases = [] )
$cabin array
$lens Lens (optional)
$databases array (optional)

forceHTTPS() protected static méthode

Do not allow insecure HTTP request to proceed
protected static forceHTTPS ( string $scheme = '' ) : boolean
$scheme string
Résultat boolean

isActiveCabinKey() public static méthode

Does a given cabin key match the current HTTP host, port, and path?
public static isActiveCabinKey ( string $cabinKey = '*', boolean $https_only = false, string $scheme = '', string $activeHost = '', string $uri = '' ) : boolean
$cabinKey string
$https_only boolean
$scheme string
$activeHost string
$uri string
Résultat boolean

isHTTPSConnection() public static méthode

Is this user currently connected over HTTPS?
public static isHTTPSConnection ( string $scheme = '' ) : boolean
$scheme string
Résultat boolean

loadInjectedRoutes() protected méthode

This loads all of the routes injected by the Gadgets into the current Cabin
protected loadInjectedRoutes ( ) : self
Résultat self

makePath() public static méthode

Replace {token}s with their regex stand-ins.
public static makePath ( string $string ) : string
$string string
Résultat string

route() public méthode

Actually serve the HTTP request
public route ( )

serve() protected méthode

Actually serve the routes. Called by route() above.
protected serve ( array $route, array $args = [] ) : mixed
$route array
$args array
Résultat mixed

serveFallback() protected méthode

The fallback route handles: - Custom pages (if any exist), or - Redirects
protected serveFallback ( ) : mixed
Résultat mixed

setActiveCabin() public méthode

Set the active cabin
public setActiveCabin ( array $cabin, string $prefix )
$cabin array
$prefix string

testCabinForUrl() public méthode

Which Cabin does this URL belong to?
public testCabinForUrl ( string $url ) : string
$url string
Résultat string

testLanding() public static méthode

Test a path against a URI
public static testLanding ( string $path, string $uri, array &$args = [], boolean $needsPrep = false ) : boolean
$path string
$uri string
$args array
$needsPrep boolean
Résultat boolean

Property Details

$CSPBuilder protected_oe property

protected CSPBuilder,ParagonIE\CSPBuilder $CSPBuilder
Résultat ParagonIE\CSPBuilder\CSPBuilder

$active_cabin public_oe static_oe property

public static string $active_cabin
Résultat string

$cabin protected_oe property

protected array $cabin
Résultat array

$cabinIndex public_oe static_oe property

public static string $cabinIndex
Résultat string

$databases protected_oe property

protected Database[],Airship\Engine $databases
Résultat Database[]

$lens protected_oe property

protected Lens,Airship\Engine $lens
Résultat Lens

$mypath public_oe static_oe property

Current request path
public static $mypath

$path public_oe static_oe property

public static string $path
Résultat string

$patternPrefix public_oe static_oe property

public static string $patternPrefix
Résultat string