PHP 클래스 Neos\Eel\Context

It works as a variable container with wrapping of return values for safe access without warnings (on missing properties).
파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$value mixed

공개 메소드들

메소드 설명
__construct ( mixed $value = null )
__toString ( ) : string
call ( string $method, array $arguments = [] ) : mixed Call a method on this context
callAndWrap ( string $method, array $arguments = [] ) : mixed Call a method and wrap the result
get ( string | integer | Context $path ) : mixed Get a value of the context
getAndWrap ( string $path = null ) : Context Get a value by path and wrap it into another context
push ( mixed $value, string $key = null ) : Context Push an entry to the context
unwrap ( ) : mixed Unwrap the context value recursively
unwrapValue ( $value ) : mixed Unwrap a value by unwrapping nested context objects
wrap ( mixed $value ) : Context Wraps the given value in a new Context

메소드 상세

__construct() 공개 메소드

public __construct ( mixed $value = null )
$value mixed

__toString() 공개 메소드

public __toString ( ) : string
리턴 string

call() 공개 메소드

Call a method on this context
public call ( string $method, array $arguments = [] ) : mixed
$method string
$arguments array Arguments to the method, if of type Context they will be unwrapped
리턴 mixed

callAndWrap() 공개 메소드

Call a method and wrap the result
public callAndWrap ( string $method, array $arguments = [] ) : mixed
$method string
$arguments array
리턴 mixed

get() 공개 메소드

This basically acts as a safe access to non-existing properties, unified array and property access (using getters) and access to the current value (empty path). If a property or key did not exist this method will return NULL.
public get ( string | integer | Context $path ) : mixed
$path string | integer | Context The path as string or Context value, will be unwrapped for convenience
리턴 mixed The value

getAndWrap() 공개 메소드

Get a value by path and wrap it into another context
public getAndWrap ( string $path = null ) : Context
$path string
리턴 Context The wrapped value

push() 공개 메소드

Is used to build array instances inside the evaluator.
public push ( mixed $value, string $key = null ) : Context
$value mixed
$key string
리턴 Context

unwrap() 공개 메소드

Unwrap the context value recursively
public unwrap ( ) : mixed
리턴 mixed

unwrapValue() 공개 메소드

This method is public for closure access.
public unwrapValue ( $value ) : mixed
$value
리턴 mixed

wrap() 공개 메소드

Wraps the given value in a new Context
public wrap ( mixed $value ) : Context
$value mixed
리턴 Context

프로퍼티 상세

$value 보호되어 있는 프로퍼티

protected mixed $value
리턴 mixed