/** * Factory method to create Model instance * @see \Zend\ServiceManager\FactoryInterface::createService() * @param ServiceLocatorInterface $serviceLocator Service locator * @return void */ public function createService(ServiceLocatorInterface $serviceLocator) { $activity = new ActivityBaseService(); $activity->setDocumentManager($serviceLocator->get('doctrine.documentmanager.odm_default')); return $activity; }