Revert "Sortable: Allow to check for a particular sort rule"

This reverts commit ae21baa41e.
This commit is contained in:
Johannes Meyer 2015-06-26 15:13:46 +02:00
parent 0fc8e6046c
commit cfd43f251e
4 changed files with 7 additions and 27 deletions

View File

@ -341,25 +341,11 @@ class SimpleQuery implements QueryInterface, Queryable, Iterator
/**
* Whether an order is set
*
* @param string $column
*
* @return bool
*/
public function hasOrder($column = null)
public function hasOrder()
{
if (empty($this->order)) {
return false;
} elseif ($column === null) {
return true;
}
foreach ($this->order as $rule) {
if ($rule[0] === $column) {
return true;
}
}
return false;
return !empty($this->order);
}
/**

View File

@ -36,11 +36,9 @@ interface Sortable
/**
* Whether an order is set
*
* @param string $column
*
* @return bool
*/
public function hasOrder($column = null);
public function hasOrder();
/**
* Get the order if any

View File

@ -315,13 +315,11 @@ class RepositoryQuery implements QueryInterface, Iterator
/**
* Return whether any sort rules were applied to this query
*
* @param string $column
*
* @return bool
*/
public function hasOrder($column = null)
public function hasOrder()
{
return $this->query->hasOrder($column);
return $this->query->hasOrder();
}
/**

View File

@ -294,13 +294,11 @@ abstract class DataView implements QueryInterface, IteratorAggregate
/**
* Whether an order is set
*
* @param string $column
*
* @return bool
*/
public function hasOrder($column = null)
public function hasOrder()
{
return $this->query->hasOrder($column);
return $this->query->hasOrder();
}
/**