| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | final public function fromArray($data = array()) |
||
| 19 | { |
||
| 20 | $accessor = PropertyAccess::createPropertyAccessor(); |
||
| 21 | |||
| 22 | foreach ($data as $property => $value) { |
||
| 23 | if($accessor->isWritable($this, $property)) { |
||
| 24 | $accessor->setValue($this, $property, $value); |
||
| 25 | } |
||
| 26 | } |
||
| 27 | |||
| 28 | return $this; |
||
| 29 | } |
||
| 30 | } |
||
| 31 |