| 1 | <?php |
||
| 17 | class DbService implements ServiceInterface |
||
| 18 | { |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var EntityManager |
||
| 22 | */ |
||
| 23 | protected $entityManager; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * ORM constructor. |
||
| 27 | * |
||
| 28 | * @param EntityManager $entityManager |
||
| 29 | * |
||
| 30 | * @codeCoverageIgnore |
||
| 31 | */ |
||
| 32 | public function __construct(EntityManager $entityManager) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return EntityManager |
||
| 39 | */ |
||
| 40 | public function getManager() |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Return the EntityFetcher |
||
| 47 | * |
||
| 48 | * @param string $entity |
||
| 49 | * @param integer|null $primaryKey |
||
| 50 | * |
||
| 51 | * @return Entity|EntityFetcher |
||
| 52 | * |
||
| 53 | * @throws DbException |
||
| 54 | * |
||
| 55 | * @codeCoverageIgnore Is covered by tflori/orm |
||
| 56 | */ |
||
| 57 | public function fetch(string $entity, $primaryKey = null) |
||
| 65 | |||
| 66 | } |