Pinq\Iterators\IIteratorScheme::orderedIterator PHP 메소드

orderedIterator() 공개 메소드

Returns an iterator with will sort the elements according to the supplied function and direction.
public orderedIterator ( Traversable $iterator, callable $function, boolean $isAscending ) : Pinq\Iterators\IOrderedIterator
$iterator Traversable
$function callable
$isAscending boolean
리턴 Pinq\Iterators\IOrderedIterator
    public function orderedIterator(\Traversable $iterator, callable $function, $isAscending);

Usage Example

예제 #1
0
 public function orderByDescending(callable $function)
 {
     return $this->constructScopedSelf($this->scheme->orderedIterator($this->elements, $function, false));
 }