/** * (boot hook) * * @param \Silex\Application $application */ public function boot(Application $application) { if ($application['elasticsearch']['connections']) { $documentManagers = $application['elasticsearch']['connections']; foreach (array_keys($documentManagers) as $key) { $key = strtolower($key); $application->offsetSet(sprintf('es.%s_document_manager', $key), $application['es.manager']($key)); } } }
public function offsetSet($id, $value) { $isPublic = $this->isDefaultNewServicesPublic(); if ($value instanceof PublicService) { $isPublic = true; $value = $value->getValue(); } parent::offsetSet($id, $value); if ($isPublic) { $this->publicServices[$id] = true; } }
/** * (boot hook) * * @param \Silex\Application $application */ public function boot(Application $application) { if ($application['doctrine_mongodb']['document_managers']) { $documentManagers = $application['doctrine_mongodb']['document_managers']; foreach (array_keys($documentManagers) as $key) { $key = strtolower($key); $application->offsetSet(sprintf('doctrine_mongodb.%s_document_manager', $key), $application['doctrine_mongodb.document_manager']($key)); } } }