[Provider] Change provider construction (possible BC break)

* Created AbstractProvider class (for all DB services), which handles the default batch_size option.
 * The logger Closure is now optional for populate().
 * Removed unused Elastica_Type argument from Provider constructors.
 * Added unit tests for Doctrine's AbstractProvider class.
 * The extra argument (ManagerRegistry) for Doctrine providers is now an appended constructor argument, so the extension no longer needs to use different replacement indexes for Propel/Doctrine providers.
This commit is contained in:
Jeremy Mikola 2012-03-09 18:51:08 -05:00
commit e09225eb09
12 changed files with 349 additions and 181 deletions

View file

@ -2,8 +2,6 @@
namespace FOQ\ElasticaBundle\Provider;
use Closure;
/**
* Insert application domain objects into elastica types
*
@ -12,9 +10,9 @@ use Closure;
interface ProviderInterface
{
/**
* Add all domain objects of a repository to the elastica type
* Persists all domain objects to ElasticSearch for this provider.
*
* @param Closure $loggerClosure
*/
function populate(Closure $loggerClosure);
function populate(\Closure $loggerClosure = null);
}