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()); } }
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); }
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); }