PHP Class Zephir\Expression\Closure

Creates an anonymous function within the extension simulating a closure
Show file Open project: phalcon/zephir Class Usage Examples

Protected Properties

Property Type Description
$expecting boolean
$expectingVariable Zephir\Variable
$id Unique closure ID
$readOnly boolean

Public Methods

Method Description
compile ( array $expression, Zephir\CompilationContext $compilationContext ) : Zephir\CompiledExpression Creates a closure
setExpectReturn ( boolean $expecting, Variable $expectingVariable = null ) Sets if the variable must be resolved into a direct variable symbol create a temporary value or ignore the return value
setReadOnly ( boolean $readOnly ) Sets if the result of the evaluated expression is read only

Method Details

compile() public method

Creates a closure
public compile ( array $expression, Zephir\CompilationContext $compilationContext ) : Zephir\CompiledExpression
$expression array
$compilationContext Zephir\CompilationContext
return Zephir\CompiledExpression

setExpectReturn() public method

Sets if the variable must be resolved into a direct variable symbol create a temporary value or ignore the return value
public setExpectReturn ( boolean $expecting, Variable $expectingVariable = null )
$expecting boolean
$expectingVariable Zephir\Variable

setReadOnly() public method

Sets if the result of the evaluated expression is read only
public setReadOnly ( boolean $readOnly )
$readOnly boolean

Property Details

$expecting protected property

protected bool $expecting
return boolean

$expectingVariable protected property

protected Variable,Zephir $expectingVariable
return Zephir\Variable

$id protected static property

Unique closure ID
protected static $id

$readOnly protected property

protected bool $readOnly
return boolean