1 | <?php |
||
32 | trait SyncElementTrait |
||
33 | { |
||
34 | use TransformElementIdTrait, |
||
35 | TransformElementPayloadTrait; |
||
36 | |||
37 | /** |
||
38 | * @param string $id |
||
39 | * @param ConnectionInterface|string|null $connection |
||
40 | * @param CacheInterface|string|null $cache |
||
41 | * @return callable |
||
42 | */ |
||
43 | public abstract function rawHttpReadRelay( |
||
48 | |||
49 | /** |
||
50 | * @param array $payload |
||
51 | * @param string|null $identifier |
||
52 | * @param ConnectionInterface|string|null $connection |
||
53 | * @param CacheInterface|string|null $cache |
||
54 | * @return callable |
||
55 | * @throws \yii\base\InvalidConfigException |
||
56 | */ |
||
57 | public abstract function rawHttpUpsertRelay( |
||
63 | |||
64 | /** |
||
65 | * @param ElementInterface $element |
||
66 | * @param Objects $field |
||
67 | * @param ConnectionInterface|null $connection |
||
68 | * @param CacheInterface|null $cache |
||
69 | * @return bool |
||
70 | * @throws \yii\base\InvalidConfigException |
||
71 | */ |
||
72 | public function syncDown( |
||
93 | |||
94 | /** |
||
95 | * @param ElementInterface $element |
||
96 | * @param Objects $field |
||
97 | * @param string $id |
||
98 | * @param ConnectionInterface|null $connection |
||
99 | * @param CacheInterface|null $cache |
||
100 | * @return bool |
||
101 | * @throws \yii\base\InvalidConfigException |
||
102 | */ |
||
103 | public function rawSyncDown( |
||
125 | |||
126 | /** |
||
127 | * @param ResponseInterface $response |
||
128 | * @param ElementInterface $element |
||
129 | * @param Objects $field |
||
130 | * @return bool |
||
131 | */ |
||
132 | protected function handleSyncDownResponse( |
||
154 | |||
155 | /** |
||
156 | * @param ElementInterface $element |
||
157 | * @param Objects $field |
||
158 | * @param ConnectionInterface|null $connection |
||
159 | * @param CacheInterface|null $cache |
||
160 | * @return bool |
||
161 | * @throws \yii\base\InvalidConfigException |
||
162 | */ |
||
163 | |||
164 | public function syncUp( |
||
179 | |||
180 | /** |
||
181 | * @param ElementInterface $element |
||
182 | * @param Objects $field |
||
183 | * @param array $payload |
||
184 | * @param string|null $id |
||
185 | * @param ConnectionInterface|null $connection |
||
186 | * @param CacheInterface|null $cache |
||
187 | * @return bool |
||
188 | * @throws \yii\base\InvalidConfigException |
||
189 | */ |
||
190 | public function rawSyncUp( |
||
215 | |||
216 | /** |
||
217 | * @param ResponseInterface $response |
||
218 | * @param ElementInterface $element |
||
219 | * @param Objects $field |
||
220 | * @param string|null $id |
||
221 | * @return bool |
||
222 | */ |
||
223 | protected function handleSyncUpResponse( |
||
249 | |||
250 | /** |
||
251 | * @param ResponseInterface $response |
||
252 | * @param ElementInterface $element |
||
253 | */ |
||
254 | protected function handleResponseErrors(ResponseInterface $response, ElementInterface $element) |
||
273 | } |
||
274 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.