Library/Operators/BaseOperator.php
public function getExpectedComplexLiteral(CompilationContext $compilationContext, $expression, $type = 'variable')
    {
        $isExpecting = $this->expecting;
        $symbolVariable = $this->expectingVariable;

        if ($isExpecting) {
            if (\is_object($symbolVariable)) {
                if ($symbolVariable->getType() == $type || 'return_value' == $symbolVariable->getName()) {
                    $symbolVariable->initVariant($compilationContext);
                } else {
                    if (!$this->readOnly) {
                        $symbolVariable = $compilationContext->symbolTable->getTempComplexLiteralVariableForWrite($type, $compilationContext, $expression);
                    } else {
                        $symbolVariable = $compilationContext->symbolTable->getTempLocalVariableForWrite($type, $compilationContext, $expression);
                    }
                }
            } else {
                if (!$this->readOnly) {
                    $symbolVariable = $compilationContext->symbolTable->getTempComplexLiteralVariableForWrite($type, $compilationContext, $expression);
                } else {
                    $symbolVariable = $compilationContext->symbolTable->getTempLocalVariableForWrite($type, $compilationContext, $expression);
                }
            }
        }

        return $symbolVariable;
    }
public function getExpectedComplexLiteral(CompilationContext $compilationContext, $expression, $type = 'variable')
    {
        $isExpecting = $this->expecting;
        $symbolVariable = $this->expectingVariable;

        if ($isExpecting) {
            if (\is_object($symbolVariable)) {
                if ($symbolVariable->getType() == $type || 'return_value' == $symbolVariable->getName()) {
                    $symbolVariable->initVariant($compilationContext);
                } else {
                    if (!$this->readOnly) {
                        $symbolVariable = $compilationContext->symbolTable->getTempComplexLiteralVariableForWrite($type, $compilationContext, $expression);
                    } else {
                        $symbolVariable = $compilationContext->symbolTable->getTempLocalVariableForWrite($type, $compilationContext, $expression);
                    }
                }
            } else {
                if (!$this->readOnly) {
                    $symbolVariable = $compilationContext->symbolTable->getTempComplexLiteralVariableForWrite($type, $compilationContext, $expression);
                } else {
                    $symbolVariable = $compilationContext->symbolTable->getTempLocalVariableForWrite($type, $compilationContext, $expression);
                }
            }
        }

        return $symbolVariable;
    }
public function getExpectedComplexLiteral ( CompilationContext $ compilationContext , $ expression , $ type = 'variable' ) { $ isExpecting = $ this -> expecting ; $ symbolVariable = $ this -> expectingVariable ; if ( $ isExpecting ) { if ( \ is_object ( $ symbolVariable ) ) { if ( $ symbolVariable -> getType ( ) == $ type || 'return_value' == $ symbolVariable -> getName ( ) ) { $ symbolVariable -> initVariant ( $ compilationContext ) ; } else { if ( ! $ this -> readOnly ) { $ symbolVariable = $ compilationContext -> symbolTable -> getTempComplexLiteralVariableForWrite ( $ type , $ compilationContext , $ expression ) ; } else { $ symbolVariable = $ compilationContext -> symbolTable -> getTempLocalVariableForWrite ( $ type , $ compilationContext , $ expression ) ; } } } else { if ( ! $ this -> readOnly ) { $ symbolVariable = $ compilationContext -> symbolTable -> getTempComplexLiteralVariableForWrite ( $ type , $ compilationContext , $ expression ) ; } else { $ symbolVariable = $ compilationContext -> symbolTable -> getTempLocalVariableForWrite ( $ type , $ compilationContext , $ expression ) ; } } } return $ symbolVariable ; }
Returns the expected variable for assignment or creates a temporary variable to
store the result, if a temporary variable is created it use whose body is only freed
on every iteration.

@param CompilationContext $compilationContext
@param array              $expression
@param string             $type

@return Variable
Returns the expected variable for assignment or creates a temporary variable to store the result if a temporary variable is created it use whose body is only freed on every iteration .