From 23cfb31651a959db9cb7d2bfcfbb87d82736f2e2 Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Tue, 13 Mar 2012 13:44:49 -0400 Subject: [PATCH] Update documentation for custom provider services --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 08c894c..d03f9aa 100644 --- a/README.md +++ b/README.md @@ -212,10 +212,11 @@ You can change this value in the persistence configuration. #### Manual provider -Create a service with the tag "foq_elastica.provider". +Create a service with the tag "foq_elastica.provider" and attributes for the +index and type for which the service will provide. - + @@ -242,9 +243,11 @@ Its class must implement `FOQ\ElasticaBundle\Provider\ProviderInterface`. * * @param Closure $loggerClosure */ - public function populate(Closure $loggerClosure) + public function populate(Closure $loggerClosure = null) { - $loggerClosure('Indexing users'); + if ($loggerClosure) { + $loggerClosure('Indexing users'); + } $this->userType->addDocuments(array( array('username' => 'Bob')