public function getEvaluationContext(IResolvedParameterRegistry $parameters = null)
    {
        $thisObject    = null;
        $variableTable = array_fill_keys($this->parameterScopedVariableMap, null);
        unset($variableTable['this']);

        if ($parameters !== null) {
            foreach ($this->parameterScopedVariableMap as $parameter => $variableName) {
                if ($variableName === 'this') {
                    $thisObject = $parameters[$parameter];
                } else {
                    $variableTable[$variableName] = $parameters[$parameter];
                }
            }
        }

        foreach ($this->unusedParameterDefaultMap as $name => $evaluator) {
            $variableTable[$name] = $evaluator->evaluate();
        }

        return new O\EvaluationContext($this->namespace, $this->scopeType, $thisObject, $variableTable);
    }
public function getEvaluationContext(IResolvedParameterRegistry $parameters = null)
    {
        $thisObject    = null;
        $variableTable = array_fill_keys($this->parameterScopedVariableMap, null);
        unset($variableTable['this']);

        if ($parameters !== null) {
            foreach ($this->parameterScopedVariableMap as $parameter => $variableName) {
                if ($variableName === 'this') {
                    $thisObject = $parameters[$parameter];
                } else {
                    $variableTable[$variableName] = $parameters[$parameter];
                }
            }
        }

        foreach ($this->unusedParameterDefaultMap as $name => $evaluator) {
            $variableTable[$name] = $evaluator->evaluate();
        }

        return new O\EvaluationContext($this->namespace, $this->scopeType, $thisObject, $variableTable);
    }
public function getEvaluationContext ( IResolvedParameterRegistry $ parameters = null ) { $ thisObject = null ; $ variableTable = array_fill_keys ( $ this -> parameterScopedVariableMap , null ) ; unset ( $ variableTable [ 'this' ] ) ; if ( $ parameters !== null ) { foreach ( $ this -> parameterScopedVariableMap as $ parameter => $ variableName ) { if ( $ variableName === 'this' ) { $ thisObject = $ parameters [ $ parameter ] ; } else { $ variableTable [ $ variableName ] = $ parameters [ $ parameter ] ; } } } foreach ( $ this -> unusedParameterDefaultMap as $ name => $ evaluator ) { $ variableTable [ $ name ] = $ evaluator -> evaluate ( ) ; } return new O \ EvaluationContext ( $ this -> namespace , $ this -> scopeType , $ thisObject , $ variableTable ) ; }
Gets an evaluation context for function with the resolved parameters.

@param IResolvedParameterRegistry|null $parameters

@return O\IEvaluationContext
Gets an evaluation context for function with the resolved parameters .