Pinq\Providers\Traversable\ScopeEvaluator::visitOrderBy PHP 메소드

visitOrderBy() 공개 메소드

public visitOrderBy ( OrderBy $query )
$query Pinq\Queries\Segments\OrderBy
    public function visitOrderBy(Segments\OrderBy $query)
    {
        $first = true;
        foreach ($query->getOrderings() as $orderFunction) {
            $direction = $this->resolvedParameters[$orderFunction->getIsAscendingId()] ? Direction::ASCENDING : Direction::DESCENDING;
            if ($first) {
                $this->traversable = $this->traversable->orderBy($this->resolvedParameters[$orderFunction->getProjectionFunction()->getCallableId()], $direction);
                $first = false;
            } else {
                $this->traversable = $this->traversable->thenBy($this->resolvedParameters[$orderFunction->getProjectionFunction()->getCallableId()], $direction);
            }
        }
    }