1 | <?php |
||
24 | abstract class AbstractEntityMapper implements EntityMapperInterface |
||
25 | { |
||
26 | |||
27 | /** |
||
28 | * @var EntityInterface |
||
29 | */ |
||
30 | protected $entity; |
||
31 | |||
32 | /** |
||
33 | * @var EntityDescriptorInterface |
||
34 | */ |
||
35 | protected $descriptor; |
||
36 | |||
37 | /** |
||
38 | * @var AdapterInterface |
||
39 | */ |
||
40 | protected $adapter; |
||
41 | |||
42 | /** |
||
43 | * @var string |
||
44 | */ |
||
45 | protected $entityClassName; |
||
46 | |||
47 | /** |
||
48 | * Get entity descriptor |
||
49 | * |
||
50 | * @return EntityDescriptorInterface |
||
51 | */ |
||
52 | 12 | public function getDescriptor() |
|
62 | |||
63 | /** |
||
64 | * Set entity descriptor |
||
65 | * |
||
66 | * @param EntityDescriptorInterface $descriptor |
||
67 | * |
||
68 | * @return $this|self|EntityMapper |
||
69 | */ |
||
70 | 12 | public function setDescriptor($descriptor) |
|
75 | |||
76 | /** |
||
77 | * Sets the adapter for this mapper |
||
78 | * |
||
79 | * @param AdapterInterface $adapter |
||
80 | * |
||
81 | * @return self|$this|EntityMapper |
||
82 | */ |
||
83 | 10 | public function setAdapter(AdapterInterface $adapter) |
|
88 | |||
89 | /** |
||
90 | * Retrieves the current adapter |
||
91 | * |
||
92 | * @return AdapterInterface |
||
93 | */ |
||
94 | 6 | public function getAdapter() |
|
98 | |||
99 | /** |
||
100 | * Gets entity class name for this mapper |
||
101 | * |
||
102 | * @return string |
||
103 | */ |
||
104 | 8 | public function getEntityClassName() |
|
111 | |||
112 | /** |
||
113 | * Sets entity class name for this mapper |
||
114 | * |
||
115 | * @param string $entityClassName |
||
116 | * |
||
117 | * @return self|$this|EntityMapper |
||
118 | */ |
||
119 | 10 | public function setEntityClassName($entityClassName) |
|
124 | |||
125 | } |