| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var ModuleOptions $options |
||
| 20 | */ |
||
| 21 | $options = $container->get('lmcuser_module_options'); |
||
| 22 | $dbAdapter = $container->get('lmcuser_laminas_db_adapter'); |
||
| 23 | $hydrator = $container->get('lmcuser_user_hydrator'); |
||
| 24 | |||
| 25 | $entityClass = $options->getUserEntityClass(); |
||
| 26 | $tableName = $options->getTableName(); |
||
| 27 | |||
| 28 | $mapper = new Mapper\User(); |
||
| 29 | $mapper->setDbAdapter($dbAdapter); |
||
| 30 | $mapper->setTableName($tableName); |
||
| 31 | $mapper->setEntityPrototype(new $entityClass); |
||
| 32 | $mapper->setHydrator($hydrator); |
||
| 33 | |||
| 34 | return $mapper; |
||
| 35 | } |
||
| 36 | } |
||
| 37 |