Pinq\Queries\Builders\JoinOptionsInterpreter::interpretJoinOptions PHP Метод

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

public interpretJoinOptions ( MethodCallExpression $expression, MethodCallExpression &$sourceExpression = null )
$expression Pinq\Expressions\MethodCallExpression
$sourceExpression Pinq\Expressions\MethodCallExpression
    public function interpretJoinOptions(O\MethodCallExpression $expression, O\MethodCallExpression &$sourceExpression = null)
    {
        $defaultValueKeyPair = null;
        while (strcasecmp($this->getMethodName($expression), 'withDefault') === 0) {
            if ($defaultValueKeyPair === null) {
                $defaultValueKeyPair = [$this->getArgumentValueAt(0, $expression), $this->getOptionalArgumentValueAt(1, $expression)];
            }
            $expression = $this->getSourceMethodCall($expression);
        }
        switch (strtolower($this->getMethodName($expression))) {
            case 'on':
                $this->interpretation->interpretCustomJoinFilter($this->getFunctionAt($this->getId('filter'), 0, $expression));
                $expression = $this->getSourceMethodCall($expression);
                break;
            case 'onequality':
                $this->interpretation->interpretEqualityJoinFilter($this->getFunctionAt($this->getId('outer-key'), 0, $expression), $this->getFunctionAt($this->getId('inner-key'), 1, $expression));
                $expression = $this->getSourceMethodCall($expression);
                break;
        }
        $this->sourceInterpreter->interpretSource($this->getArgumentAt(0, $expression));
        $sourceInterpretation = $this->sourceInterpreter->getInterpretation();
        $isGroupJoin = strcasecmp($this->getMethodName($expression), 'groupJoin') === 0;
        $sourceExpression = $expression;
        return $this->interpretation->interpretJoinOptions($isGroupJoin, $sourceInterpretation, $defaultValueKeyPair !== null ? $this->getId('default-key') : null, $defaultValueKeyPair !== null ? $this->getId('default-value') : null, $defaultValueKeyPair);
    }