Ejemplo n.º 1
0
 public function Compare($x, $y)
 {
     $orderresult = parent::Compare($x->getOrderByKey(), $y->getOrderByKey());
     //only use thenby if the the orderby elements are the same.
     if ($orderresult != 0) {
         return $orderresult;
     } else {
         return $this->thenby->Compare($x->getThenByKey(), $y->getThenByKey());
     }
 }
Ejemplo n.º 2
0
 public function Compare($x, $y)
 {
     $xkey = call_user_func_array($this->keyselector, array($x));
     $ykey = call_user_func_array($this->keyselector, array($y));
     return parent::Compare($xkey, $ykey);
 }
Ejemplo n.º 3
0
 public function Compare($x, $y)
 {
     //call the parent comparer but swap order of elements to turn into a descending comparer.
     return parent::Compare($y, $x);
 }