PHP Класс Airship\Engine\AutoPilot

RESTful Routing for the Airship
Наследование: implements Airship\Engine\Contract\RouterInterface
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$active_cabin string
$cabinIndex string
$mypath Current request path
$path string
$patternPrefix string

Защищенные свойства (Protected)

Свойство Тип Описание
$CSPBuilder ParagonIE\CSPBuilder\CSPBuilder
$cabin array
$databases Database[]
$lens Lens

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
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.

Описание методов

__construct() публичный Метод

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

forceHTTPS() защищенный статический Метод

Do not allow insecure HTTP request to proceed
protected static forceHTTPS ( string $scheme = '' ) : boolean
$scheme string
Результат boolean

isActiveCabinKey() публичный статический Метод

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
Результат boolean

isHTTPSConnection() публичный статический Метод

Is this user currently connected over HTTPS?
public static isHTTPSConnection ( string $scheme = '' ) : boolean
$scheme string
Результат boolean

loadInjectedRoutes() защищенный Метод

This loads all of the routes injected by the Gadgets into the current Cabin
protected loadInjectedRoutes ( ) : self
Результат self

makePath() публичный статический Метод

Replace {token}s with their regex stand-ins.
public static makePath ( string $string ) : string
$string string
Результат string

route() публичный Метод

Actually serve the HTTP request
public route ( )

serve() защищенный Метод

Actually serve the routes. Called by route() above.
protected serve ( array $route, array $args = [] ) : mixed
$route array
$args array
Результат mixed

serveFallback() защищенный Метод

The fallback route handles: - Custom pages (if any exist), or - Redirects
protected serveFallback ( ) : mixed
Результат mixed

setActiveCabin() публичный Метод

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

testCabinForUrl() публичный Метод

Which Cabin does this URL belong to?
public testCabinForUrl ( string $url ) : string
$url string
Результат string

testLanding() публичный статический Метод

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
Результат boolean

Описание свойств

$CSPBuilder защищенное свойство

protected CSPBuilder,ParagonIE\CSPBuilder $CSPBuilder
Результат ParagonIE\CSPBuilder\CSPBuilder

$active_cabin публичное статическое свойство

public static string $active_cabin
Результат string

$cabin защищенное свойство

protected array $cabin
Результат array

$cabinIndex публичное статическое свойство

public static string $cabinIndex
Результат string

$databases защищенное свойство

protected Database[],Airship\Engine $databases
Результат Database[]

$lens защищенное свойство

protected Lens,Airship\Engine $lens
Результат Lens

$mypath публичное статическое свойство

Current request path
public static $mypath

$path публичное статическое свойство

public static string $path
Результат string

$patternPrefix публичное статическое свойство

public static string $patternPrefix
Результат string