Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function setProperties(array $request_data) |
||
18 | { |
||
19 | foreach ($request_data as $field_name => $field_value) { |
||
20 | $setter_name = 'set' . str_replace(' ', '', ucwords(str_replace('_', ' ', $field_name))); |
||
21 | if (method_exists($this, $setter_name)) { |
||
22 | $this->{$setter_name}($field_value); |
||
23 | } |
||
24 | } |
||
25 | |||
26 | return $this; |
||
27 | } |
||
28 | } |
||
29 |