Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function set($name, $value) { |
||
25 | if(in_array($name, array_keys(get_class_vars(get_class($this))))) { |
||
26 | $this->$name = $value; |
||
27 | } |
||
28 | elseif (in_array("set_{$name}", get_class_methods($this))) { |
||
29 | $func = "set_{$name}"; |
||
30 | return $this->$func($value); |
||
31 | } |
||
32 | return $this; |
||
33 | } |
||
34 | } |