Zephir\Call::processExpectedObservedReturn PHP Метод

processExpectedObservedReturn() публичный Метод

Processes the symbol variable that will be used to return the result of the symbol call
public processExpectedObservedReturn ( zephir\CompilationContext $compilationContext )
$compilationContext zephir\CompilationContext
    public function processExpectedObservedReturn(CompilationContext $compilationContext)
    {
        $expr = $this->_expression;
        $expression = $expr->getExpression();
        /**
         * Create temporary variable if needed
         */
        $mustInit = false;
        $symbolVariable = null;
        $isExpecting = $expr->isExpectingReturn();
        if ($isExpecting) {
            $symbolVariable = $expr->getExpectingVariable();
            if (is_object($symbolVariable)) {
                $readDetector = new ReadDetector($expression);
                if ($readDetector->detect($symbolVariable->getName(), $expression)) {
                    $symbolVariable = $compilationContext->symbolTable->getTempVariableForObserveOrNullify('variable', $compilationContext, $expression);
                } else {
                    $mustInit = true;
                }
            } else {
                $symbolVariable = $compilationContext->symbolTable->getTempVariableForObserveOrNullify('variable', $compilationContext, $expression);
            }
        }
        $this->_mustInit = $mustInit;
        $this->_symbolVariable = $symbolVariable;
        $this->_isExpecting = $isExpecting;
    }