Pinq\Queries\Builders\RequestQueryInterpreter::visitOffsetExists PHP Метод

visitOffsetExists() закрытый защищенный Метод

final protected visitOffsetExists ( Expression $expression )
$expression Pinq\Expressions\Expression
    protected final function visitOffsetExists(O\Expression $expression)
    {
        $requestId = $this->getId('offset-exists');
        $indexId = $this->getId('offset-exists-index');
        if ($expression instanceof O\MethodCallExpression) {
            $this->interpretation->interpretOffsetExists($requestId, $indexId, $this->getArgumentValueAt(0, $expression));
            $this->interpretSourceAsScope($expression);
            return;
        } elseif ($expression instanceof O\IssetExpression) {
            $issetArguments = $expression->getValues();
            if (count($issetArguments) === 1 && $issetArguments[0] instanceof O\IndexExpression) {
                $this->interpretation->interpretOffsetExists($requestId, $indexId, $this->getValue($issetArguments[0]->getIndex()));
                $this->interpretSourceAsScope($issetArguments[0]);
                return;
            }
        }
        throw new PinqException('Cannot interpret offset exists request: invalid expression type, expecting %s, %s given', O\MethodCallExpression::getType() . ' or ' . O\IssetExpression::getType() . ' with a single parameter index', $expression->getType());
    }