Skip to content

Commit

Permalink
why we have a factory for the "user hydrator" but doesn't use them?
Browse files Browse the repository at this point in the history
- change directly object build to factory
- change factory to the current UserHydrator
  • Loading branch information
ClemensSahs committed Nov 6, 2012
1 parent bdd4e2a commit 8e6329e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Module.php
Expand Up @@ -132,8 +132,7 @@ public function getServiceConfig()
},

'zfcuser_user_hydrator' => function ($sm) {
$hydrator = new \Zend\Stdlib\Hydrator\ClassMethods();
return $hydrator;
return new Mapper\UserHydrator();
},

'zfcuser_user_mapper' => function ($sm) {
Expand All @@ -142,7 +141,7 @@ public function getServiceConfig()
$mapper->setDbAdapter($sm->get('zfcuser_zend_db_adapter'));
$entityClass = $options->getUserEntityClass();
$mapper->setEntityPrototype(new $entityClass);
$mapper->setHydrator(new Mapper\UserHydrator());
$mapper->setHydrator( $sm->get('zfcuser_user_hydrator') );
return $mapper;
},
),
Expand Down

0 comments on commit 8e6329e

Please sign in to comment.