Get rid of total count from UserSearcher

Same reasoning as 64e6b7d26c
This commit is contained in:
Toby Zerner 2015-06-18 12:42:56 +09:30
parent 11b740c768
commit b7617fa5d3
2 changed files with 2 additions and 12 deletions

View File

@ -6,13 +6,10 @@ class UserSearchResults
protected $areMoreResults;
protected $total;
public function __construct($users, $areMoreResults, $total)
public function __construct($users, $areMoreResults)
{
$this->users = $users;
$this->areMoreResults = $areMoreResults;
$this->total = $total;
}
public function getUsers()
@ -20,11 +17,6 @@ class UserSearchResults
return $this->users;
}
public function getTotal()
{
return $this->total;
}
public function areMoreResults()
{
return $this->areMoreResults;

View File

@ -50,8 +50,6 @@ class UserSearcher implements SearcherInterface
$this->gambits->apply($criteria->query, $this);
$total = $this->query->count();
$sort = $criteria->sort ?: $this->defaultSort;
foreach ($sort as $field => $order) {
@ -81,6 +79,6 @@ class UserSearcher implements SearcherInterface
$users->load($load);
return new UserSearchResults($users, $areMoreResults, $total);
return new UserSearchResults($users, $areMoreResults);
}
}