1 | <?php |
||
22 | abstract class AbstractRepository |
||
23 | { |
||
24 | |||
25 | /** |
||
26 | * @var AdapterInterface |
||
27 | */ |
||
28 | protected $adapter; |
||
29 | |||
30 | /** |
||
31 | * @var EntityDescriptorInterface |
||
32 | */ |
||
33 | protected $entityDescriptor; |
||
34 | |||
35 | /** |
||
36 | * @var EntityMapperInterface |
||
37 | */ |
||
38 | protected $entityMapper; |
||
39 | |||
40 | /** |
||
41 | * @var IdentityMapInterface |
||
42 | */ |
||
43 | protected $identityMap; |
||
44 | |||
45 | /** |
||
46 | * Sets the adapter for this statement |
||
47 | * |
||
48 | * @param AdapterInterface $adapter |
||
49 | * |
||
50 | * @return $this|self|AbstractRepository |
||
51 | */ |
||
52 | public function setAdapter(AdapterInterface $adapter) |
||
57 | |||
58 | /** |
||
59 | * Retrieves the current adapter |
||
60 | * |
||
61 | * @return AdapterInterface |
||
62 | */ |
||
63 | public function getAdapter() |
||
67 | |||
68 | /** |
||
69 | * Set the entity descriptor interface |
||
70 | * |
||
71 | * @param EntityDescriptorInterface $descriptor |
||
72 | * @return $this|self|AbstractRepository |
||
73 | */ |
||
74 | public function setEntityDescriptor(EntityDescriptorInterface $descriptor) |
||
79 | |||
80 | /** |
||
81 | * Gets entity descriptor |
||
82 | * |
||
83 | * @return EntityDescriptorInterface |
||
84 | */ |
||
85 | public function getEntityDescriptor() |
||
89 | |||
90 | /** |
||
91 | * @return EntityMapperInterface |
||
92 | */ |
||
93 | public function getEntityMapper() |
||
97 | |||
98 | /** |
||
99 | * @param $entityMapper |
||
100 | * @return $this |
||
101 | */ |
||
102 | public function setEntityMapper($entityMapper) |
||
107 | |||
108 | /** |
||
109 | * Sets identity map for this repository |
||
110 | * |
||
111 | * @param IdentityMapInterface $map |
||
112 | * @return $this|self|EntityRepository |
||
113 | */ |
||
114 | public function setIdentityMap(IdentityMapInterface $map) |
||
119 | |||
120 | /** |
||
121 | * Gets identity map for this repository |
||
122 | * |
||
123 | * @return IdentityMapInterface |
||
124 | */ |
||
125 | protected function getIdentityMap() |
||
132 | |||
133 | } |