| Conditions | 4 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function configure(& $object, $params = null) |
||
| 32 | { |
||
| 33 | // Use entity params if external is not passed, iterate all children class variables |
||
| 34 | foreach (isset($params) ? $params : get_object_vars($this) as $var => $value) { |
||
| 35 | // If module has configured property defined |
||
| 36 | if (property_exists($object, $var)) { |
||
| 37 | // Set module variable value |
||
| 38 | $object->$var = $value; |
||
| 39 | } |
||
| 40 | } |
||
| 41 | |||
| 42 | return true; |
||
| 43 | } |
||
| 44 | } |
||
| 45 |