PHP Class eZ\Publish\Core\Pagination\Pagerfanta\LocationSearchHitAdapter

Will return results as SearchHit objects.
Inheritance: implements Pagerfanta\Adapter\AdapterInterface
Show file Open project: ezsystems/ezpublish-kernel Class Usage Examples

Public Methods

Method Description
__construct ( eZ\Publish\API\Repository\Values\Content\LocationQuery $query, eZ\Publish\API\Repository\SearchService $searchService, array $languageFilter = [] )
getNbResults ( ) : integer Returns the number of results.
getSlice ( integer $offset, integer $length ) : eZ\Publish\API\Repository\Values\Content\Search\SearchHit[] Returns a slice of the results, as SearchHit objects.

Method Details

__construct() public method

public __construct ( eZ\Publish\API\Repository\Values\Content\LocationQuery $query, eZ\Publish\API\Repository\SearchService $searchService, array $languageFilter = [] )
$query eZ\Publish\API\Repository\Values\Content\LocationQuery
$searchService eZ\Publish\API\Repository\SearchService
$languageFilter array

getNbResults() public method

Returns the number of results.
public getNbResults ( ) : integer
return integer The number of results.

getSlice() public method

Returns a slice of the results, as SearchHit objects.
public getSlice ( integer $offset, integer $length ) : eZ\Publish\API\Repository\Values\Content\Search\SearchHit[]
$offset integer The offset.
$length integer The length.
return eZ\Publish\API\Repository\Values\Content\Search\SearchHit[]