protected function _assignPropertyArrayMultipleIndex($variable, ZephirVariable $symbolVariable, CompiledExpression $resolvedExpr, CompilationContext $compilationContext, array $statement)
{
$codePrinter = $compilationContext->codePrinter;
$property = $statement['property'];
$compilationContext->headersManager->add('kernel/object');
/**
* Create a temporal zval (if needed)
*/
$variableExpr = $this->_getResolvedArrayItem($resolvedExpr, $compilationContext);
/**
* Only string/variable/int
*/
$offsetExprs = array();
foreach ($statement['index-expr'] as $indexExpr) {
$indexExpression = new Expression($indexExpr);
$resolvedIndex = $indexExpression->compile($compilationContext);
switch ($resolvedIndex->getType()) {
case 'string':
case 'int':
case 'uint':
case 'ulong':
case 'long':
case 'variable':
break;
default:
throw new CompilerException("Expression: " . $resolvedIndex->getType() . " cannot be used as index without cast", $statement['index-expr']);
}
$offsetExprs[] = $resolvedIndex;
}
$compilationContext->backend->assignPropertyArrayMulti($symbolVariable, $variableExpr, $property, $offsetExprs, $compilationContext);
if ($variableExpr->isTemporal()) {
$variableExpr->setIdle(true);
}
}