| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function setParams(array $params = array()){
|
||
| 31 | |||
| 32 | foreach($params as $param => $value){
|
||
| 33 | if((new \ReflectionClass($this))->hasProperty($param) === false) |
||
| 34 | throw new \Exception(sprintf("param '%s' not found in module '%s'", $param, self::class));
|
||
| 35 | |||
| 36 | $this->{$param} = $value;
|
||
| 37 | } |
||
| 38 | return $this; |
||
| 39 | } |
||
| 40 | } |
||
| 41 |