1 | <?php |
||
4 | class ArgumentObject { |
||
5 | |||
6 | /** |
||
7 | * @var array |
||
8 | */ |
||
9 | protected $modelData = []; |
||
10 | |||
11 | /** |
||
12 | * Construct this magic object. Give it a array amd |
||
13 | * it will turn into an object. Its a hydration. |
||
14 | * |
||
15 | * Object constructor. |
||
16 | * @param $array |
||
17 | */ |
||
18 | 16 | public function __construct($array = array()) |
|
22 | |||
23 | /** |
||
24 | * Convert a string to camelCase |
||
25 | * |
||
26 | * @param string $value |
||
27 | * @return string |
||
28 | */ |
||
29 | 1 | public static function camelCase($value) |
|
36 | |||
37 | /** |
||
38 | * Initialize this object's properties from an array. |
||
39 | * |
||
40 | * @param array $array Used to seed this object's properties. |
||
41 | * @return void |
||
42 | */ |
||
43 | 16 | protected function mapTypes($array) |
|
56 | |||
57 | /** |
||
58 | * Return the keyType for a given key. |
||
59 | * |
||
60 | * @param $key |
||
61 | * @return string |
||
62 | */ |
||
63 | 16 | protected function keyType($key) |
|
67 | |||
68 | /** |
||
69 | * Return the dataType for a key. |
||
70 | * |
||
71 | * @param $key |
||
72 | * @return string |
||
73 | */ |
||
74 | protected function dataType($key) |
||
78 | |||
79 | /** |
||
80 | * Check to see if a given key is set or not. |
||
81 | * |
||
82 | * @param $key |
||
83 | * @return bool |
||
84 | */ |
||
85 | public function __isset($key) |
||
89 | |||
90 | /** |
||
91 | * Unset a given key. |
||
92 | * |
||
93 | * @param $key |
||
94 | */ |
||
95 | public function __unset($key) |
||
99 | } |
||
100 |