1 | <?php |
||
11 | abstract class BaseType |
||
12 | { |
||
13 | /** |
||
14 | * Array of required data params for type |
||
15 | * |
||
16 | * @var array |
||
17 | */ |
||
18 | protected static $requiredParams = []; |
||
19 | |||
20 | /** |
||
21 | * Map of input data |
||
22 | * |
||
23 | * @var array |
||
24 | */ |
||
25 | protected static $map = []; |
||
26 | |||
27 | /** |
||
28 | * Validate input data |
||
29 | * |
||
30 | * @param array $data |
||
31 | * |
||
32 | * @return bool |
||
33 | * |
||
34 | * @throws InvalidArgumentException |
||
35 | */ |
||
36 | 99 | public static function validate($data) |
|
44 | |||
45 | 74 | public function map($data) |
|
58 | |||
59 | 86 | protected static function toCamelCase($str) |
|
63 | |||
64 | 14 | public function toJson($inner = false) |
|
86 | |||
87 | 97 | public static function fromResponse($data) |
|
95 | } |
||
96 |