Since: 15.01.2013
Author: Vitaliy Demidov (vitaliy@scalr.com)
Inheritance: extends Scalr\Service\Aws\Ec2\AbstractEc2DataType
Beispiel #1
0
 /**
  * Loads InstanceStatusDetailsSetList from simple xml object
  *
  * @param   \SimpleXMLElement $sxml
  * @return  InstanceStatusDetailsSetList Returns InstanceStatusDetailsSetList
  */
 protected function _loadInstanceStatusDetailsSetList(\SimpleXMLElement $sxml)
 {
     $list = new InstanceStatusDetailsSetList();
     $list->setEc2($this->ec2);
     if (!empty($sxml->item)) {
         foreach ($sxml->item as $v) {
             $item = new InstanceStatusDetailsSetData();
             $item->setEc2($this->ec2);
             $item->name = (string) $v->name;
             $item->status = (string) $v->status;
             $item->impairedSince = $this->exist($v->impairedSince) ? new DateTime((string) $v->impairedSince, new DateTimeZone('UTC')) : null;
             $list->append($item);
             unset($item);
         }
     }
     return $list;
 }