Added RepositoryManagerInterface
This commit is contained in:
parent
98536d3f29
commit
a6e8d0a31c
2 changed files with 39 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue