FOSElasticaBundle/Repository.php
Richard Miller 67a11a59ce Merge branch '2.0'
Conflicts:
	Finder/FinderInterface.php
	Repository.php
2012-08-07 19:42:38 +01:00

42 lines
868 B
PHP

<?php
namespace FOQ\ElasticaBundle;
use FOQ\ElasticaBundle\Finder\PaginatedFinderInterface;
/**
* @author Richard Miller <info@limethinking.co.uk>
*
* Basic respoitory to be extended to hold custom queries to be run
* in the finder.
*/
class Repository
{
protected $finder;
public function __construct(PaginatedFinderInterface $finder)
{
$this->finder = $finder;
}
public function find($query, $limit=null)
{
return $this->finder->find($query, $limit);
}
public function findHybrid($query, $limit=null)
{
return $this->finder->findHybrid($query, $limit);
}
public function findPaginated($query)
{
return $this->finder->findPaginated($query);
}
public function createPaginatorAdapter($query)
{
return $this->finder->createPaginatorAdapter($query);
}
}