public function __construct($code = null, $name = null) { parent::__construct(); $this->set__code($code); $this->set__name($name); $this->refreshXML(); }
/** * This is internally called right after `execute`. * Typically used to prepare the class state with the `xmlResult` object. * @return void */ protected function prepareResponse() { if (isset($this->response)) { return; } if (isset($this->xmlResponse) && is_subclass_of(static::$RESPONSE_CLASS, self::$RESPONSE_CLASS)) { $this->response = new static::$RESPONSE_CLASS(); $this->response->loadXML($this->xmlResponse); } }
/** * @param int $adultCount Number of adults. Must be at least 1. * @param int[] $childrenAges An array of integers representing the childrens' ages. */ public function __construct($adultCount = 1, $childrenAges = null) { parent::__construct(); $this->set__adultCount($adultCount ? $adultCount : 1); $this->childrenAges = array(); if (isset($childrenAges) && is_array($childrenAges)) { foreach ($childrenAges as $age) { $this->addChild($age); } } $this->refreshXML(); }
/** * (non-PHPdoc) * @see \zamnuts\EANAPIClient\Common\SupportModels\EANAbstractSupportModel::loadXML() * @param SimpleXMLElement $xml */ public function loadXML(SimpleXMLElement $xml) { parent::loadXML($xml); $LandmarkListRoot = EANLandmarkListSummaries::getRootTagName(); if (isset($xml->{$LandmarkListRoot})) { $attrs = $xml->{$LandmarkListRoot}->attributes(); if (isset($attrs->activePropertyCount)) { $this->activePropertyCount = (int) $attrs->activePropertyCount; } } }
/** * @param SimpleXMLElement $xml */ public function loadXML(SimpleXMLElement $xml) { parent::loadXML($xml); $this->items = array(); $childTag = $this->get__childTagName(); if (isset($childTag) && $childTag && isset($xml->{$childTag})) { foreach ($xml->{$childTag} as $xmlChild) { $item = new static::$CHILD_CLASS(); $item->loadXML($xmlChild); $this->addItem($item); } } $this->refreshXML(); }
public function __construct() { parent::__construct(); }
/** * TODO: asXML * (non-PHPdoc) * @see \zamnuts\EANAPIClient\Common\SupportModels\EANAbstractSupportModel::asXML() */ public function asXML() { return parent::asXML(); }
/** * (non-PHPdoc) * @see \zamnuts\EANAPIClient\Common\SupportModels\EANAbstractSupportModel::loadXML() * @param SimpleXMLElement $xml */ public function loadXML(SimpleXMLElement $xml) { parent::loadXML($xml); if (isset($xml->ErrorAttributes->errorAttributesMap) && isset($xml->ErrorAttributes->errorAttributesMap->entry)) { foreach ($xml->ErrorAttributes->errorAttributesMap->entry as $entry) { if (isset($entry->key, $entry->value, $this->errorAttributes[$entry->key])) { $this->errorAttributes[$entry->key] = $entry->value; } } } else { if (isset($xml->ErrorAttributes)) { foreach ($xml->ErrorAttributes as $key => $value) { $this->errorAttributes[$key] = $value; } } } }
public function __construct() { parent::__construct(); $this->initRoomRateDetailsList(); }
/** * TODO: asXML * (non-PHPdoc) * @see \zamnuts\EANAPIClient\Common\SupportModels\EANAbstractSupportModel::asXML() */ public function asXML() { parent::asXML(); }