DataView: Remove obsolete $filter property
This commit is contained in:
parent
6063eea34f
commit
7812f6ddcc
|
@ -29,8 +29,6 @@ abstract class DataView implements QueryInterface, SortRules, FilterColumns, Ite
|
||||||
*/
|
*/
|
||||||
protected $query;
|
protected $query;
|
||||||
|
|
||||||
protected $filter;
|
|
||||||
|
|
||||||
protected $connection;
|
protected $connection;
|
||||||
|
|
||||||
protected $isSorted = false;
|
protected $isSorted = false;
|
||||||
|
@ -52,7 +50,6 @@ abstract class DataView implements QueryInterface, SortRules, FilterColumns, Ite
|
||||||
{
|
{
|
||||||
$this->connection = $connection;
|
$this->connection = $connection;
|
||||||
$this->query = $connection->query($this->getQueryName(), $columns);
|
$this->query = $connection->query($this->getQueryName(), $columns);
|
||||||
$this->filter = Filter::matchAll();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -91,7 +88,6 @@ abstract class DataView implements QueryInterface, SortRules, FilterColumns, Ite
|
||||||
|
|
||||||
public function where($condition, $value = null)
|
public function where($condition, $value = null)
|
||||||
{
|
{
|
||||||
$this->filter->addFilter(Filter::where($condition, $value));
|
|
||||||
$this->query->where($condition, $value);
|
$this->query->where($condition, $value);
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -268,9 +264,14 @@ abstract class DataView implements QueryInterface, SortRules, FilterColumns, Ite
|
||||||
return $columns;
|
return $columns;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the current filter
|
||||||
|
*
|
||||||
|
* @return Filter
|
||||||
|
*/
|
||||||
public function getFilter()
|
public function getFilter()
|
||||||
{
|
{
|
||||||
return $this->filter;
|
return $this->query->getFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -471,8 +472,7 @@ abstract class DataView implements QueryInterface, SortRules, FilterColumns, Ite
|
||||||
*/
|
*/
|
||||||
public function addFilter(Filter $filter)
|
public function addFilter(Filter $filter)
|
||||||
{
|
{
|
||||||
$this->query->addFilter(clone($filter));
|
$this->query->addFilter($filter);
|
||||||
$this->filter = $filter; // TODO: Hmmmm.... and?
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue