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

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

final protected visitCount ( Expression $expression )
$expression Pinq\Expressions\Expression
    protected final function visitCount(O\Expression $expression)
    {
        $this->interpretation->interpretCount($this->getId('count'));
        if ($expression instanceof O\MethodCallExpression) {
            $this->interpretSourceAsScope($expression);
        } elseif ($expression instanceof O\FunctionCallExpression && count($expression->getArguments()) > 0) {
            $this->scopeInterpreter->interpretScope($expression->getArguments()[0]->getValue());
        } else {
            throw new PinqException('Cannot interpret count request: invalid expression type, expecting %s, %s given', O\MethodCallExpression::getType() . ' or ' . O\FunctionCallExpression::getType() . ' with at least one argument', $expression->getType());
        }
    }