public static function createFromXML(CultureFeed_SimpleXMLElement $xml)
 {
     $eventActions = new self();
     $eventActions->passholder = CultureFeed_Uitpas_Passholder::createFromXML($xml->xpath('passHolder', FALSE));
     $eventActions->welcomeAdvantages = CultureFeed_Uitpas_Passholder_WelcomeAdvantageResultSet::createFromXML($xml->xpath('welcomeAdvantages', FALSE), 'welcomeAdvantage');
     $eventActions->pointsPromotions = CultureFeed_Uitpas_Passholder_PointsPromotionResultSet::createFromXML($xml->xpath('pointsPromotions', FALSE), 'pointsPromotion');
     $eventCheckin = $xml->xpath('eventCheckin', FALSE);
     if ($eventCheckin instanceof CultureFeed_SimpleXMLElement) {
         $eventActions->eventCheckin = CultureFeed_Uitpas_Passholder_EventCheckin::createFromXML($eventCheckin);
     }
     $eventBuyTicket = $xml->xpath('eventBuyTicket', FALSE);
     if ($eventBuyTicket instanceof CultureFeed_SimpleXMLElement) {
         $eventActions->eventBuyTicket = CultureFeed_Uitpas_Passholder_EventBuyTicket::createFromXML($eventBuyTicket);
     }
     return $eventActions;
 }
Example #2
0
 /**
  * Get the redeem options
  *
  * @param CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions $query The query
  */
 public function getPromotionPoints(CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions $query)
 {
     $data = $query->toPostData();
     $result = $this->oauth_client->consumerGetAsXml('uitpas/passholder/pointsPromotions', $data);
     try {
         $xml = new CultureFeed_SimpleXMLElement($result);
     } catch (Exception $e) {
         throw new CultureFeed_ParseException($result);
     }
     $promotions = CultureFeed_Uitpas_Passholder_PointsPromotionResultSet::createFromXML($xml->xpath('/response', false));
     return $promotions;
 }