1 | <?php |
||
10 | abstract class Wrapper implements MapperInterface { |
||
11 | |||
12 | /** |
||
13 | * @var MapperInterface |
||
14 | */ |
||
15 | private $mapper; |
||
16 | |||
17 | /** |
||
18 | * @return Mapper |
||
19 | */ |
||
20 | protected function getMapper() { |
||
23 | |||
24 | /** |
||
25 | * @param MapperInterface $mapper |
||
26 | * @return $this |
||
27 | */ |
||
28 | protected function setMapper(MapperInterface $mapper) { |
||
33 | |||
34 | /** |
||
35 | * @return string |
||
36 | */ |
||
37 | public function getOutputClass() { |
||
41 | |||
42 | /** |
||
43 | * @param string $class |
||
44 | * @return $this |
||
45 | */ |
||
46 | public function setOutputClass($class) { |
||
52 | |||
53 | /** |
||
54 | * @return object |
||
55 | */ |
||
56 | public function getOutputObject() { |
||
60 | |||
61 | /** |
||
62 | * @param object $object |
||
63 | * @return $this |
||
64 | */ |
||
65 | public function setOutputObject($object) { |
||
71 | |||
72 | /** |
||
73 | * @return integer |
||
74 | */ |
||
75 | public function getAnnotationAdapterType() { |
||
79 | |||
80 | /** |
||
81 | * @param integer $adapter |
||
82 | * @return $this |
||
83 | */ |
||
84 | public function setAnnotationAdapterType($adapter) { |
||
90 | |||
91 | /** |
||
92 | * @return Transforms |
||
93 | */ |
||
94 | public function getTransforms() { |
||
98 | |||
99 | /** |
||
100 | * @param Transforms $transforms |
||
101 | * @return $this |
||
102 | */ |
||
103 | public function setTransforms(Transforms $transforms) { |
||
109 | |||
110 | /** |
||
111 | * @return boolean |
||
112 | */ |
||
113 | public function hasValidation() { |
||
114 | return $this->getMapper() |
||
115 | ->hasValidation(); |
||
116 | } |
||
117 | |||
118 | /** |
||
119 | * @return $this |
||
120 | */ |
||
121 | public function disableValidation() { |
||
127 | |||
128 | /** |
||
129 | * @return $this |
||
130 | */ |
||
131 | public function enableValidation() { |
||
137 | |||
138 | /** |
||
139 | * @param array $attributes |
||
140 | * @return $this |
||
141 | */ |
||
142 | public function setSkipAttributes(array $attributes = []) { |
||
148 | |||
149 | /** |
||
150 | * @return array |
||
151 | */ |
||
152 | public function getSkipAttributes() { |
||
156 | |||
157 | /** |
||
158 | * @return object |
||
159 | */ |
||
160 | public function map() { |
||
164 | |||
165 | /** |
||
166 | * @param string|object $outputClassOrObject |
||
167 | * @param integer $adapter |
||
168 | * @return $this |
||
169 | */ |
||
170 | abstract protected function createMapper( |
||
174 | |||
175 | } |