PHP Class PHPSA\Compiler\Expression

Show file Open project: ovr/phpsa Class Usage Examples

Protected Properties

Property Type Description
$context PHPSA\Context
$eventManager Webiny\Component\EventManager\EventManager

Public Methods

Method Description
__construct ( Context $context, EventManager $eventManager )
compile ( object | string $expr ) : CompiledExpression
declareVariable ( PhpParser\Node\Expr\Variable $expr, mixed $value = null, integer $type = CompiledExpression::UNKNOWN ) : CompiledExpression
getFullyQualifiedNodeName ( PhpParser\Node\Name\FullyQualified $expr ) : CompiledExpression
getNodeName ( Name $expr ) : CompiledExpression

Protected Methods

Method Description
factory ( $expr ) : PHPSA\Compiler\ExpressionCompilerInterface | AbstractExpressionCompiler

Method Details

__construct() public method

public __construct ( Context $context, EventManager $eventManager )
$context PHPSA\Context
$eventManager Webiny\Component\EventManager\EventManager

compile() public method

public compile ( object | string $expr ) : CompiledExpression
$expr object | string
return PHPSA\CompiledExpression

declareVariable() public method

public declareVariable ( PhpParser\Node\Expr\Variable $expr, mixed $value = null, integer $type = CompiledExpression::UNKNOWN ) : CompiledExpression
$expr PhpParser\Node\Expr\Variable
$value mixed
$type integer
return PHPSA\CompiledExpression

factory() protected method

protected factory ( $expr ) : PHPSA\Compiler\ExpressionCompilerInterface | AbstractExpressionCompiler
$expr
return PHPSA\Compiler\ExpressionCompilerInterface | PHPSA\Compiler\Expression\AbstractExpressionCompiler

getFullyQualifiedNodeName() public method

public getFullyQualifiedNodeName ( PhpParser\Node\Name\FullyQualified $expr ) : CompiledExpression
$expr PhpParser\Node\Name\FullyQualified
return PHPSA\CompiledExpression

getNodeName() public method

public getNodeName ( Name $expr ) : CompiledExpression
$expr PhpParser\Node\Name
return PHPSA\CompiledExpression

Property Details

$context protected property

protected Context,PHPSA $context
return PHPSA\Context

$eventManager protected property

protected EventManager,Webiny\Component\EventManager $eventManager
return Webiny\Component\EventManager\EventManager