1 | <?php |
||
20 | class BaseType |
||
21 | { |
||
22 | /** |
||
23 | * @var Collection |
||
24 | */ |
||
25 | protected $attributes; |
||
26 | |||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $map = []; |
||
31 | |||
32 | /** |
||
33 | * BaseType constructor. |
||
34 | * |
||
35 | * @param $attributes |
||
36 | */ |
||
37 | 3 | public function __construct($attributes) |
|
41 | |||
42 | /** |
||
43 | * @param array $attributes |
||
44 | * |
||
45 | * @return Collection |
||
46 | */ |
||
47 | 3 | private function build(array $attributes = []) |
|
65 | |||
66 | /** |
||
67 | * @param array|string $json |
||
68 | * |
||
69 | * @return static |
||
70 | */ |
||
71 | 2 | public static function create($json) |
|
75 | |||
76 | 1 | public function get($key) |
|
80 | |||
81 | 1 | public function toArray() |
|
99 | |||
100 | public function toJson() |
||
104 | } |