| Conditions | 4 |
| Paths | 4 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function __construct($xmlData) |
||
| 23 | { |
||
| 24 | if($xmlData == null) |
||
| 25 | { |
||
| 26 | $this->Name = 'Desktop'; |
||
| 27 | $this->Type = 'desktop'; |
||
| 28 | } |
||
| 29 | else |
||
| 30 | { |
||
| 31 | parent::__construct($xmlData); |
||
| 32 | |||
| 33 | foreach ($xmlData->children() as $child) |
||
| 34 | { |
||
| 35 | switch ($child->getName()) { |
||
| 36 | case 'modelName': |
||
| 37 | $this->ModelName = $child->__toString(); |
||
| 38 | break; |
||
| 39 | } |
||
| 40 | } |
||
| 41 | } |
||
| 42 | } |
||
| 43 | } |