1 | <?php |
||
17 | class DbService implements ServiceInterface |
||
18 | { |
||
19 | |||
20 | /** @var EntityManager */ |
||
21 | protected $entityManager; |
||
22 | |||
23 | /** |
||
24 | * ORM constructor. |
||
25 | * |
||
26 | * @param EntityManager $entityManager |
||
27 | */ |
||
28 | public function __construct(EntityManager $entityManager) |
||
32 | |||
33 | /** |
||
34 | * @return EntityManager |
||
35 | */ |
||
36 | public function getManager() |
||
40 | |||
41 | /** |
||
42 | * Return the EntityFetcher |
||
43 | * |
||
44 | * @param string $entity |
||
45 | * @param integer|null $primaryKey |
||
46 | * @return Entity|EntityFetcher |
||
47 | * @codeCoverageIgnore Is covered by tflori/orm |
||
48 | */ |
||
49 | public function fetch(string $entity, $primaryKey = null) |
||
53 | |||
54 | /** |
||
55 | * Save an entity |
||
56 | * |
||
57 | * @param Entity $entity |
||
58 | * @codeCoverageIgnore Is covered by tflori/orm |
||
59 | */ |
||
60 | public function save(Entity $entity) |
||
64 | |||
65 | } |