Hi again,
another question came to my mind. Which way do you prefer.
Using the constructor to pass objects:
'User\Mapper\User' => function($sm) {
$table = $sm->get('User\Table\User');
$mapper = new UserMapper($table);
return $mapper;
},
Or using setter methods to pass objects
'User\Mapper\User' => function($sm) {
$table = $sm->get('User\Table\User');
$mapper = new UserMapper();
$mapper->setDbTable($table);
return $mapper;
},
Any comments?
Regards,
Ralf
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]