2012-05-22 15:23:51 +02:00
|
|
|
<?php
|
|
|
|
|
2013-03-27 18:44:06 +01:00
|
|
|
namespace FOS\ElasticaBundle\Paginator;
|
2012-05-22 15:23:51 +02:00
|
|
|
|
|
|
|
interface PaginatorAdapterInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Returns the number of results.
|
|
|
|
*
|
|
|
|
* @return integer The number of results.
|
|
|
|
*
|
|
|
|
* @api
|
|
|
|
*/
|
|
|
|
function getTotalHits();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns an slice of the results.
|
|
|
|
*
|
|
|
|
* @param integer $offset The offset.
|
|
|
|
* @param integer $length The length.
|
|
|
|
*
|
2013-03-02 12:23:44 +01:00
|
|
|
* @return PartialResultsInterface
|
2012-05-22 15:23:51 +02:00
|
|
|
*
|
|
|
|
* @api
|
|
|
|
*/
|
|
|
|
function getResults($offset, $length);
|
2013-08-14 11:20:45 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns Facets
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
function getFacets();
|
2014-10-08 19:31:39 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns Aggregations
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
function getAggregations();
|
2012-05-22 15:23:51 +02:00
|
|
|
}
|