Ejemplo n.º 1
0
 /**
  * @param callable|array $comparer (v1, v2, k1?, k2?) -> int
  * @return OrderingGinq
  */
 public function orderWithDesc($comparer = null)
 {
     $comparer = ComparerResolver::resolve($comparer, Comparer::getDefault());
     $comparer = new ReverseComparer($comparer);
     return new OrderingGinq($this->getIterator(), $comparer);
 }
Ejemplo n.º 2
0
 /**
  * @param callable|array $comparer (v1, v2, k1?, k2?) -> int
  * @return OrderingGinq
  */
 public function thenWithDesc($comparer)
 {
     $comparer = ComparerResolver::resolve($comparer, Comparer::getDefault());
     $comparer = new ReverseComparer($comparer);
     $comparer = new CompoundComparer($this->comparer, $comparer);
     return new OrderingGinq($this->it, $comparer);
 }