protected function _loadGeoRestrictionData(\SimpleXMLElement $sxml) { $item = null; if ($this->exist($sxml)) { $item = new GeoRestrictionData(); $item->setCloudFront($this->cloudFront); $item->restrictionType = $this->exist($sxml->RestrictionType) ? (string) $sxml->RestrictionType : null; $item->locations = []; if (!empty($sxml->Items->Location)) { foreach ($sxml->Items->Location as $v) { $item->locations[] = (string) $v; } } } return $item; }