1 | <?php |
||
20 | class TransformerHelper |
||
21 | { |
||
22 | /** |
||
23 | * The sync payload action name |
||
24 | */ |
||
25 | const PAYLOAD_ACTION_SYNC = 'sync'; |
||
26 | |||
27 | /** |
||
28 | * The sync payload action name |
||
29 | */ |
||
30 | const PAYLOAD_ACTION_SAVE = 'save'; |
||
31 | |||
32 | /** |
||
33 | * @param ResponseInterface $response |
||
34 | * @return DynamicModel |
||
35 | */ |
||
36 | public static function responseToModel(ResponseInterface $response): DynamicModel |
||
45 | |||
46 | /** |
||
47 | * @param $transformer |
||
48 | * @return bool |
||
49 | */ |
||
50 | public static function isTransformerClass($transformer): bool |
||
59 | |||
60 | /** |
||
61 | * @param $transformer |
||
62 | * @return bool |
||
63 | */ |
||
64 | public static function isTransformerClassArray($transformer): bool |
||
72 | |||
73 | /** |
||
74 | * @noinspection PhpDocMissingThrowsInspection |
||
75 | * |
||
76 | * @param $transformer |
||
77 | * @return callable|null |
||
78 | */ |
||
79 | public static function resolveTransformer($transformer) |
||
97 | } |
||
98 |