2011-12-11 21:17:41 +01:00
|
|
|
<?php
|
|
|
|
|
2013-03-27 18:44:06 +01:00
|
|
|
namespace FOS\ElasticaBundle\Manager;
|
2011-12-11 21:17:41 +01:00
|
|
|
|
2013-03-27 18:44:06 +01:00
|
|
|
use FOS\ElasticaBundle\Finder\FinderInterface;
|
2011-12-11 21:17:41 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Richard Miller <info@limethinking.co.uk>
|
|
|
|
*
|
|
|
|
* Allows retrieval of basic or custom repository for mapped Doctrine
|
|
|
|
* entities/documents.
|
|
|
|
*/
|
|
|
|
interface RepositoryManagerInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Adds entity name and its finder.
|
|
|
|
* Custom repository class name can also be added.
|
|
|
|
*
|
|
|
|
* @param string $entityName
|
|
|
|
* @param $finder
|
|
|
|
* @param string $repositoryName
|
|
|
|
*/
|
|
|
|
public function addEntity($entityName, FinderInterface $finder, $repositoryName = null);
|
|
|
|
|
|
|
|
/**
|
2015-03-12 11:20:00 +01:00
|
|
|
* Return repository for entity.
|
2011-12-11 21:17:41 +01:00
|
|
|
*
|
|
|
|
* Returns custom repository if one specified otherwise
|
|
|
|
* returns a basic repository.
|
|
|
|
*
|
|
|
|
* @param string $entityName
|
|
|
|
*/
|
|
|
|
public function getRepository($entityName);
|
|
|
|
}
|