Added RepositoryManagerInterface

This commit is contained in:
Richard Miller 2011-12-11 20:17:41 +00:00
commit a6e8d0a31c
2 changed files with 39 additions and 2 deletions

View file

@ -2,6 +2,7 @@
namespace FOQ\ElasticaBundle\Manager;
use FOQ\ElasticaBundle\Finder\FinderInterface;
use FOQ\ElasticaBundle\Repository;
use RuntimeException;
@ -11,12 +12,12 @@ use RuntimeException;
* Allows retrieval of basic or custom repository for mapped Doctrine
* entities/documents.
*/
class RepositoryManager
class RepositoryManager implements RepositoryManagerInterface
{
protected $entities;
protected $repositories;
public function addEntity($entityName, $finder, $repositoryName = null)
public function addEntity($entityName, FinderInterface $finder, $repositoryName = null)
{
$this->entities[$entityName]= array();
$this->entities[$entityName]['finder'] = $finder;