public function __construct(SimpleXMLElement $xml = null) { parent::__construct($xml); if (is_null($xml)) { return; } $this->code = (string) $xml->code; $this->description = (string) $xml->description; if (count($xml->endTime)) { $this->endTime = (int) $xml->endTime; } if (count($xml->duration)) { $this->duration = (int) $xml->duration; } }
public function __construct(SimpleXMLElement $xml = null) { parent::__construct($xml); if (is_null($xml)) { return; } $this->protocolType = (string) $xml->protocolType; $this->sourceUrl = (string) $xml->sourceUrl; $this->adType = (string) $xml->adType; $this->title = (string) $xml->title; if (count($xml->endTime)) { $this->endTime = (int) $xml->endTime; } if (count($xml->duration)) { $this->duration = (int) $xml->duration; } }
public function __construct(SimpleXMLElement $xml = null) { parent::__construct($xml); if (is_null($xml)) { return; } $this->parentId = (string) $xml->parentId; $this->text = (string) $xml->text; if (count($xml->endTime)) { $this->endTime = (int) $xml->endTime; } if (count($xml->duration)) { $this->duration = (int) $xml->duration; } if (count($xml->depth)) { $this->depth = (int) $xml->depth; } if (count($xml->childrenCount)) { $this->childrenCount = (int) $xml->childrenCount; } if (count($xml->directChildrenCount)) { $this->directChildrenCount = (int) $xml->directChildrenCount; } }