PHP Class Zephir\Statements\Let\ArrayIndex

Adds/Updates an array index
Show file Open project: phalcon/zephir Class Usage Examples

Public Methods

Method Description
assign ( string $variable, Variable $symbolVariable, Zephir\CompiledExpression $resolvedExpr, Zephir\CompilationContext $compilationContext, array $statement ) Compiles foo[y] = {expr}

Protected Methods

Method Description
_assignArrayIndexMultiple ( string $variable, Variable $symbolVariable, Zephir\CompiledExpression $resolvedExpr, Zephir\CompilationContext $compilationContext, array $statement ) Compiles foo[y][x] = {expr} (multiple offset)
_assignArrayIndexSingle ( string $variable, Variable $symbolVariable, Zephir\CompiledExpression $resolvedExpr, Zephir\CompilationContext $compilationContext, array $statement ) Compiles foo[y] = {expr} (one offset)
_getResolvedArrayItem ( Zephir\CompiledExpression $resolvedExpr, Zephir\CompilationContext $compilationContext ) : Zephir\GlobalConstant | Variable Resolves an item that will be assigned to an array offset

Method Details

_assignArrayIndexMultiple() protected method

Compiles foo[y][x] = {expr} (multiple offset)
protected _assignArrayIndexMultiple ( string $variable, Variable $symbolVariable, Zephir\CompiledExpression $resolvedExpr, Zephir\CompilationContext $compilationContext, array $statement )
$variable string
$symbolVariable Zephir\Variable
$resolvedExpr Zephir\CompiledExpression
$compilationContext Zephir\CompilationContext
$statement array

_assignArrayIndexSingle() protected method

Compiles foo[y] = {expr} (one offset)
protected _assignArrayIndexSingle ( string $variable, Variable $symbolVariable, Zephir\CompiledExpression $resolvedExpr, Zephir\CompilationContext $compilationContext, array $statement )
$variable string
$symbolVariable Zephir\Variable
$resolvedExpr Zephir\CompiledExpression
$compilationContext Zephir\CompilationContext
$statement array

_getResolvedArrayItem() protected method

Resolves an item that will be assigned to an array offset
protected _getResolvedArrayItem ( Zephir\CompiledExpression $resolvedExpr, Zephir\CompilationContext $compilationContext ) : Zephir\GlobalConstant | Variable
$resolvedExpr Zephir\CompiledExpression
$compilationContext Zephir\CompilationContext
return Zephir\GlobalConstant | Zephir\Variable

assign() public method

Compiles foo[y] = {expr}
public assign ( string $variable, Variable $symbolVariable, Zephir\CompiledExpression $resolvedExpr, Zephir\CompilationContext $compilationContext, array $statement )
$variable string
$symbolVariable Zephir\Variable
$resolvedExpr Zephir\CompiledExpression
$compilationContext Zephir\CompilationContext
$statement array