Total Complexity | 6 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | trait service { |
||
13 | public function get($name) { |
||
14 | if(in_array($name, get_class_vars(get_class($this)))) { |
||
15 | return $this->$name; |
||
16 | } |
||
17 | elseif (in_array("get_{$name}", get_class_methods($this))) { |
||
18 | $func = "get_{$name}"; |
||
19 | return $this->$func(); |
||
20 | } |
||
21 | return null; |
||
22 | } |
||
23 | |||
24 | public function set($name, $value) { |
||
33 | } |
||
34 | } |