1 | <?php |
||
12 | class Synchronizer implements SynchronizerInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $className; |
||
18 | |||
19 | /** |
||
20 | * @var Type |
||
21 | */ |
||
22 | protected $type; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $onCreate; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $onUpdate; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $onDelete; |
||
38 | |||
39 | /** |
||
40 | * @var TransformerManager |
||
41 | */ |
||
42 | protected $transformer; |
||
43 | |||
44 | /** |
||
45 | * @var LoggerInterface |
||
46 | */ |
||
47 | protected $logger; |
||
48 | |||
49 | /** |
||
50 | * @param string $className |
||
51 | * @param Type $type |
||
52 | * @param string $onCreate |
||
53 | * @param string $onUpdate |
||
54 | * @param string $onDelete |
||
55 | * @param TransformerManager $transformer |
||
56 | * @param LoggerInterface $logger |
||
57 | */ |
||
58 | public function __construct( |
||
79 | |||
80 | /** |
||
81 | * @param string$action |
||
82 | */ |
||
83 | protected function validateAction($action) |
||
93 | |||
94 | /** |
||
95 | * @param object $entity |
||
96 | */ |
||
97 | protected function validateClass($entity) |
||
103 | |||
104 | /** |
||
105 | * @param string $action |
||
106 | * @param object $entity |
||
107 | */ |
||
108 | protected function performAction($action, $entity) |
||
156 | |||
157 | /** |
||
158 | * @param $entity |
||
159 | */ |
||
160 | public function synchronizeCreate($entity) |
||
168 | |||
169 | /** |
||
170 | * @param $entity |
||
171 | */ |
||
172 | public function synchronizeUpdate($entity) |
||
180 | |||
181 | /** |
||
182 | * @param $entity |
||
183 | */ |
||
184 | public function synchronizeDelete($entity) |
||
192 | |||
193 | /** |
||
194 | * @return string |
||
195 | */ |
||
196 | public function getClassName() |
||
200 | } |
||
201 |