PHP 클래스 PHPSA\CompiledExpression

파일 보기 프로젝트 열기: ovr/phpsa 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$type integer By default we don't know what it is
$value mixed Possible value
$variable Variable | null

공개 메소드들

메소드 설명
__construct ( integer $type = self::UNKNOWN, mixed $value = null, Variable $variable = null ) Construct new CompiledExpression to pass result
__debugInfo ( ) : array Returns debug info.
canBeObject ( ) : boolean This is needed via in feature $this->type can store multiple type(s) by bitmask
fromZvalValue ( $value ) : CompiledExpression If we don't know $type but know $value
getType ( ) : integer Returns the type of the expression.
getTypeName ( ) : string Returns the type of the expression as a string.
getValue ( ) : mixed Returns the value of the expression.
getVariable ( ) : Variable | null
hasValue ( ) : boolean
isArray ( ) : boolean
isCallable ( ) : boolean
isCorrectValue ( ) : boolean Check that $this->value is correct for $this->type
isEquals ( integer $value ) : boolean Checks whether the expressions value equals the given value.
isObject ( ) : boolean
isScalar ( ) : boolean
isString ( ) : boolean
isTypeKnown ( ) : boolean
toVariable ( string $name ) : Variable Creates a variable from the expression.

메소드 상세

__construct() 공개 메소드

Construct new CompiledExpression to pass result
public __construct ( integer $type = self::UNKNOWN, mixed $value = null, Variable $variable = null )
$type integer
$value mixed
$variable Variable

__debugInfo() 공개 메소드

Returns debug info.
public __debugInfo ( ) : array
리턴 array

canBeObject() 공개 메소드

This is needed via in feature $this->type can store multiple type(s) by bitmask
public canBeObject ( ) : boolean
리턴 boolean

fromZvalValue() 공개 정적인 메소드

If we don't know $type but know $value
public static fromZvalValue ( $value ) : CompiledExpression
$value
리턴 CompiledExpression

getType() 공개 메소드

Returns the type of the expression.
public getType ( ) : integer
리턴 integer

getTypeName() 공개 메소드

Returns the type of the expression as a string.
public getTypeName ( ) : string
리턴 string

getValue() 공개 메소드

Returns the value of the expression.
public getValue ( ) : mixed
리턴 mixed

getVariable() 공개 메소드

public getVariable ( ) : Variable | null
리턴 Variable | null

hasValue() 공개 메소드

public hasValue ( ) : boolean
리턴 boolean

isArray() 공개 메소드

public isArray ( ) : boolean
리턴 boolean

isCallable() 공개 메소드

public isCallable ( ) : boolean
리턴 boolean

isCorrectValue() 공개 메소드

Check that $this->value is correct for $this->type
public isCorrectValue ( ) : boolean
리턴 boolean

isEquals() 공개 메소드

Checks whether the expressions value equals the given value.
public isEquals ( integer $value ) : boolean
$value integer
리턴 boolean

isObject() 공개 메소드

public isObject ( ) : boolean
리턴 boolean

isScalar() 공개 메소드

public isScalar ( ) : boolean
리턴 boolean

isString() 공개 메소드

public isString ( ) : boolean
리턴 boolean

isTypeKnown() 공개 메소드

public isTypeKnown ( ) : boolean
리턴 boolean

toVariable() 공개 메소드

Creates a variable from the expression.
public toVariable ( string $name ) : Variable
$name string Name of the Variable
리턴 Variable

프로퍼티 상세

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

By default we don't know what it is
protected int $type
리턴 integer

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

Possible value
protected mixed $value
리턴 mixed

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

protected Variable,phpsa|null $variable
리턴 Variable | null