public function getServiceConfig() { return array('factories' => array('zfcuser_user_mapper' => function ($sm) { $options = $sm->get('zfcuser_module_options'); $mapper = new Mapper\User(); $mapper->setConfig($sm->get('config')); $mapper->setEntityPrototype(new Entity\User()); $mapper->setHydrator(new \MongoUser\Mapper\UserHydrator(false)); return $mapper; })); }
public function getServiceConfig() { return array('factories' => array('zfcuser_user_hydrator' => 'ZfcUserUserIdToId\\Factory\\Mapper\\UserHydratorFactory', 'zfcuser_user_mapper' => function ($sm) { $options = $sm->get('zfcuser_module_options'); $mapper = new Mapper\User(); $mapper->setDbAdapter($sm->get('Zend\\Db\\Adapter\\Adapter')); $mapper->setEntityPrototype(new Entity\User()); $mapper->setHydrator($sm->get('zfcuser_user_hydrator')); $mapper->setTableName($options->getTableName()); return $mapper; })); }