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