PHP Class Zephir\Expression\Constants

Resolves PHP or Zephir constants into C-Code
Show file Open project: phalcon/zephir Class Usage Examples

Protected Properties

Property Type Description
$_expecting boolean
$_expectingVariable Zephir\Variable
$_readOnly boolean
$envConstants array Reserved ENV Constants
$magicConstants array Magic constants
$resources

Public Methods

Method Description
compile ( array $expression, Zephir\CompilationContext $compilationContext ) : Zephir\CompiledExpression Resolves a PHP constant value into C-code
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

Resolves a PHP constant value into C-code
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

$_readOnly protected property

protected bool $_readOnly
return boolean

$envConstants protected property

Reserved ENV Constants
protected array $envConstants
return array

$magicConstants protected property

Magic constants
protected array $magicConstants
return array

$resources protected property

protected $resources