/** * @param CultureFeed_SimpleXMLElement $object * @return self */ public static function createFromXml(CultureFeed_SimpleXMLElement $object) { $identity = new static(); $cardXml = $object->xpath('card', false); $identity->card = CultureFeed_Uitpas_Passholder_Card::createFromXml($cardXml); $passHolderXml = $object->xpath('passHolder', false); if ($passHolderXml instanceof CultureFeed_SimpleXMLElement) { $identity->passHolder = CultureFeed_Uitpas_Passholder::createFromXML($passHolderXml); } $groupPassXml = $object->xpath('groupPass', false); if ($groupPassXml instanceof CultureFeed_SimpleXMLElement) { $identity->groupPass = CultureFeed_Uitpas_GroupPass::createFromXml($groupPassXml); } return $identity; }
/** * @param CultureFeed_SimpleXMLElement $object * @return CultureFeed_Uitpas_Passholder_CardSystemSpecific */ public static function createFromXML(CultureFeed_SimpleXMLElement $object) { $cardSystemSpecific = new self(); $cardSystemSpecific->cardSystem = CultureFeed_Uitpas_CardSystem::createFromXml($object->xpath('cardSystem', false)); $currentCard = $object->xpath('currentCard', false); if ($currentCard instanceof CultureFeed_SimpleXMLElement) { $cardSystemSpecific->currentCard = CultureFeed_Uitpas_Passholder_Card::createFromXML($currentCard); } $cardSystemSpecific->emailPreference = $object->xpath_str('emailPreference'); $cardSystemSpecific->smsPreference = $object->xpath_str('smsPreference'); $cardSystemSpecific->kansenStatuut = $object->xpath_bool('kansenStatuut'); $cardSystemSpecific->kansenStatuutExpired = $object->xpath_bool('kansenStatuutExpired'); $cardSystemSpecific->kansenStatuutEndDate = $object->xpath_time('kansenStatuutEndDate'); $cardSystemSpecific->kansenStatuutInGracePeriod = $object->xpath_bool('kansenStatuutInGracePeriod'); $cardSystemSpecific->status = $object->xpath_str('status'); return $cardSystemSpecific; }