PHP 클래스 Airship\Engine\AutoPilot

RESTful Routing for the Airship
상속: implements Airship\Engine\Contract\RouterInterface
파일 보기 프로젝트 열기: paragonie/airship

공개 프로퍼티들

프로퍼티 타입 설명
$active_cabin string
$cabinIndex string
$mypath Current request path
$path string
$patternPrefix string

보호된 프로퍼티들

프로퍼티 타입 설명
$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