Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
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 | } |
||
31 |