Pinq\Queries\Builders\ScopeInterpreter::visitOrdering PHP 메소드

visitOrdering() 최종 보호된 메소드

final protected visitOrdering ( $count, MethodCallExpression $expression )
$expression Pinq\Expressions\MethodCallExpression
    protected final function visitOrdering($count, O\MethodCallExpression $expression)
    {
        $projection = $this->getFunctionAt($this->getSegmentId("order-{$count}"), 0, $expression);
        $methodName = $this->getMethodName($expression);
        if (stripos($methodName, 'Ascending') !== false) {
            $isAscending = true;
        } elseif (stripos($methodName, 'Descending') !== false) {
            $isAscending = false;
        } else {
            $isAscending = $this->getArgumentValueAt(1, $expression) !== Direction::DESCENDING;
        }
        return [$projection, $this->getSegmentId("{$count}-isAscending"), $isAscending];
    }