PHP Class Airship\Engine\Landing

For MVC developers, this is analogous to a Controller
Inheritance: use trait CommonBolt, use trait CacheBolt, use trait LogBolt, use trait SecurityBolt
Show file Open project: paragonie/airship

Protected Properties

Property Type Description
$_cache array
$airship_cabin_prefix string
$airship_config array
$airship_csrf CSRF
$airship_databases Airship\Engine\Contract\DBInterface[][]
$airship_http_method string
$airship_lens_object Lens
$airship_lens_override array

Public Methods

Method Description
airshipEjectFromCockpit ( Lens $lens, array $databases = [], string $urlPrefix = '' ) Dependency injection aside from the controller. Allows you to write your own constructors.
airshipLand ( ) Overloadable; invoked after airshipEjectFromCockpit()
config ( string $search = '' ) : mixed Get configuration settings
resetBaseTemplate ( ) : mixed
setBaseTemplate ( string $name ) : mixed

Protected Methods

Method Description
addLensFilter ( string $name, callable $func ) Add a filter to the lens
addLensFunction ( string $name, callable $func ) Add a function to the lens
airshipChooseDB ( ) : Airship\Engine\Contract\DBInterface Choose a database. We don't do anything fancy, but a Gear might decide to do something different.
blueprint ( string $name, $cArgs ) : Blueprint Grab a blueprint
getLensAsText ( string $name, $cArgs ) : string Render a Lens as text, return a string
getNamespace ( ) : string Get the name of the current namespace
lens ( string $name, $cArgs ) : void Render a template and terminate execution. Do not cache.
lensRender ( string $name, $cArgs ) : string Render a lens, return its contents, don't exit.
overrideLens ( string $oldLens, string $newLens ) Override a lens with a different lens. (Meant for Gadgets.)
post ( InputFilterContainer $filterContainer = null, boolean $ignoreCSRFToken = false ) : array | boolean Grab post data, but only if the CSRF token is valid
setActiveMotif ( string $name ) : boolean
stasis ( string $name, variadic $cArgs ) : boolean Render lens content, cache it, then display it.
storeLensVar ( string $name, mixed $value ) : Lens Grab a lens

Method Details

addLensFilter() protected method

Add a filter to the lens
protected addLensFilter ( string $name, callable $func )
$name string
$func callable

addLensFunction() protected method

Add a function to the lens
protected addLensFunction ( string $name, callable $func )
$name string
$func callable

airshipChooseDB() protected method

Choose a database. We don't do anything fancy, but a Gear might decide to do something different.
protected airshipChooseDB ( ) : Airship\Engine\Contract\DBInterface
return Airship\Engine\Contract\DBInterface

airshipEjectFromCockpit() final public method

This is final so nobody changes it in a Gear. Please don't mess with this component.
final public airshipEjectFromCockpit ( Lens $lens, array $databases = [], string $urlPrefix = '' )
$lens Lens
$databases array
$urlPrefix string

airshipLand() public method

This is typically what you want to overload in place of a constructor.
public airshipLand ( )

blueprint() protected method

Grab a blueprint
protected blueprint ( string $name, $cArgs ) : Blueprint
$name string
$cArgs Constructor arguments
return Blueprint

config() public method

Get configuration settings
public config ( string $search = '' ) : mixed
$search string
return mixed

getLensAsText() protected method

Render a Lens as text, return a string
protected getLensAsText ( string $name, $cArgs ) : string
$name string
$cArgs Constructor arguments
return string

getNamespace() protected method

Get the name of the current namespace
protected getNamespace ( ) : string
return string

lens() protected method

Render a template and terminate execution. Do not cache.
protected lens ( string $name, $cArgs ) : void
$name string
$cArgs Constructor arguments
return void

lensRender() protected method

Render a lens, return its contents, don't exit.
protected lensRender ( string $name, $cArgs ) : string
$name string
$cArgs Constructor arguments
return string

overrideLens() protected method

Override a lens with a different lens. (Meant for Gadgets.)
protected overrideLens ( string $oldLens, string $newLens )
$oldLens string
$newLens string

post() protected method

Grab post data, but only if the CSRF token is valid
protected post ( InputFilterContainer $filterContainer = null, boolean $ignoreCSRFToken = false ) : array | boolean
$filterContainer InputFilterContainer - Type filter for POST data
$ignoreCSRFToken boolean - Don't validate CSRF tokens
return array | boolean

resetBaseTemplate() public method

public resetBaseTemplate ( ) : mixed
return mixed

setActiveMotif() protected method

protected setActiveMotif ( string $name ) : boolean
$name string
return boolean

setBaseTemplate() public method

public setBaseTemplate ( string $name ) : mixed
$name string
return mixed

stasis() protected method

Render lens content, cache it, then display it.
protected stasis ( string $name, variadic $cArgs ) : boolean
$name string
$cArgs variadic Constructor arguments
return boolean

storeLensVar() protected method

Grab a lens
protected storeLensVar ( string $name, mixed $value ) : Lens
$name string
$value mixed
return Lens

Property Details

$_cache protected property

protected array $_cache
return array

$airship_cabin_prefix protected property

protected string $airship_cabin_prefix
return string

$airship_config protected property

protected array $airship_config
return array

$airship_csrf protected property

protected CSRF $airship_csrf
return CSRF

$airship_databases protected property

protected DBInterface[][],Airship\Engine\Contract $airship_databases
return Airship\Engine\Contract\DBInterface[][]

$airship_http_method protected property

protected string $airship_http_method
return string

$airship_lens_object protected property

protected Lens,Airship\Engine $airship_lens_object
return Lens

$airship_lens_override protected property

protected array $airship_lens_override
return array