PHP 클래스 Airship\Engine\Gears

The gears class contains a bunch of methods for the plugin system (Airship Gears)
파일 보기 프로젝트 열기: paragonie/airship 1 사용 예제들

공개 메소드들

메소드 설명
attach ( string $index, string $new_type, string $namespace = '' ) : boolean Attach a plugin to overload the base class
extract ( string $index, string $desired_name, string $namespace = '' ) : string Create a shim that extends a gear type
forge ( string $index, string $type ) : boolean Add a new type to the Gears registry
get ( string $name, variadic $args ) : mixed Get an instance of a gear (all arguments after the first are passed to its constructor)
getName ( string $name ) : string Get the class name of a Gear
init ( array $gears = [] ) Set up initial classes
lazyForge ( string $index, string $type ) : boolean Add a new type to the Gears registry

보호된 메소드들

메소드 설명
coreEval ( string $code, boolean $cache = false, boolean $do_not_eval = false ) : mixed Execute a block of code.
sandboxRequire ( string $file ) : boolean Load a file in a way that doesn't allow access to the parent method's internal functions

메소드 상세

attach() 공개 정적인 메소드

Attach a plugin to overload the base class
public static attach ( string $index, string $new_type, string $namespace = '' ) : boolean
$index string Index
$new_type string New type
$namespace string Namespace
리턴 boolean

coreEval() 보호된 정적인 메소드

Execute a block of code.
protected static coreEval ( string $code, boolean $cache = false, boolean $do_not_eval = false ) : mixed
$code string
$cache boolean
$do_not_eval boolean
리턴 mixed

extract() 공개 정적인 메소드

Create a shim that extends a gear type
public static extract ( string $index, string $desired_name, string $namespace = '' ) : string
$index string
$desired_name string
$namespace string Namespace
리턴 string

forge() 공개 정적인 메소드

Add a new type to the Gears registry
public static forge ( string $index, string $type ) : boolean
$index string
$type string
리턴 boolean

get() 공개 정적인 메소드

Get an instance of a gear (all arguments after the first are passed to its constructor)
public static get ( string $name, variadic $args ) : mixed
$name string - Gear identifier
$args variadic - constructor parameters
리턴 mixed

getName() 공개 정적인 메소드

Get the class name of a Gear
public static getName ( string $name ) : string
$name string
리턴 string

init() 공개 정적인 메소드

Set up initial classes
public static init ( array $gears = [] )
$gears array

lazyForge() 공개 정적인 메소드

Add a new type to the Gears registry
public static lazyForge ( string $index, string $type ) : boolean
$index string
$type string
리턴 boolean

sandboxRequire() 보호된 메소드

Load a file in a way that doesn't allow access to the parent method's internal functions
protected sandboxRequire ( string $file ) : boolean
$file string
리턴 boolean