Library/CompiledExpression.php
public function resolve($result, CompilationContext $compilationContext)
    {
        if ($this->code instanceof \Closure) {
            $code = $this->code;
            if (!$result) {
                $tempVariable = $compilationContext->symbolTable->getTempVariableForWrite(
                    'variable',
                    $compilationContext
                );
                $compilationContext->codePrinter->output($code($tempVariable->getName()));
                $tempVariable->setIsInitialized(true, $compilationContext);

                return $tempVariable->getName();
            }

            return $code($result);
        }

        return $this->code;
    }
public function resolve($result, CompilationContext $compilationContext)
    {
        if ($this->code instanceof \Closure) {
            $code = $this->code;
            if (!$result) {
                $tempVariable = $compilationContext->symbolTable->getTempVariableForWrite(
                    'variable',
                    $compilationContext
                );
                $compilationContext->codePrinter->output($code($tempVariable->getName()));
                $tempVariable->setIsInitialized(true, $compilationContext);

                return $tempVariable->getName();
            }

            return $code($result);
        }

        return $this->code;
    }
public function resolve ( $ result , CompilationContext $ compilationContext ) { if ( $ this -> code instanceof \ Closure ) { $ code = $ this -> code ; if ( ! $ result ) { $ tempVariable = $ compilationContext -> symbolTable -> getTempVariableForWrite ( 'variable' , $ compilationContext ) ; $ compilationContext -> codePrinter -> output ( $ code ( $ tempVariable -> getName ( ) ) ) ; $ tempVariable -> setIsInitialized ( true , $ compilationContext ) ; return $ tempVariable -> getName ( ) ; } return $ code ( $ result ) ; } return $ this -> code ; }
Resolves an expression
Some code cannot be directly pushed into the generated source
because it's missing some bound parts, this method resolves the missing parts
returning the generated code.

@param string             $result
@param CompilationContext $compilationContext

@return string
Resolves an expression Some code cannot be directly pushed into the generated source because it s missing some bound parts this method resolves the missing parts returning the generated code .