Permalink
Browse files

Remove pagination adapter

  • Loading branch information...
1 parent 46152fd commit fe83ec01eb06a6a0e57e7f98f04c78e6a2767085 @MrHash MrHash committed Apr 29, 2013
Showing with 0 additions and 40 deletions.
  1. +0 −40 lib/Doctrine/Search/ElasticSearch/PaginationAdapter.php
@@ -1,40 +0,0 @@
-<?php
-
-namespace Doctrine\Search\ElasticSearch;
-
-use Zend\Paginator\Adapter\AdapterInterface;
-use Doctrine\Search\Query;
-
-class PaginationAdapter implements AdapterInterface
-{
- /** @var Query */
- protected $query;
-
- /** @var integer */
- protected $hits;
-
- public function __construct(Query $query)
- {
- $this->query = $query;
- }
-
- public function getItems($iOffset, $iItemCountPerPage)
- {
- $this->query->setFrom($iOffset);
- $this->query->setLimit($iItemCountPerPage);
-
- $resultSet = $this->query->getResult();
-
- // Return Elastica\Results if hydration is bypassed
- if($resultSet instanceof \Elastica\ResultSet) {
- return $resultSet->getResults();
- }
-
- return $resultSet;
- }
-
- public function count()
- {
- return $this->query->count();
- }
-}

0 comments on commit fe83ec0

Please sign in to comment.