feat: simplify xml parsing, add 'mutable' property for personal data

This commit is contained in:
Björn Fromme
2025-01-30 10:40:38 +01:00
parent c75f069ce0
commit eae9879519
8 changed files with 47 additions and 32 deletions
+6 -11
View File
@@ -24,19 +24,14 @@ class BookingsParser extends AbstractParser
$booking->bookingNumber = $this->getIntOrNullValue($node->filterXPath('//vorgangsnummer'));
$booking->status = $this->getStringOrNullValue($node->filterXPath('//status'));
$booking->participantCount = $this->getIntOrNullValue($node->filterXPath('//personen'));
$booking->price = $this->stringToFloat($this->getStringOrNullValue($node->filterXPath('//preis')));
$booking->bookingDate = $this
->stringToDateTime($this->getStringOrNullValue($node->filterXPath('//buchungsdatum')));
$booking->price = $this->getFloatOrNullValue($node->filterXPath('//preis'));
$booking->bookingDate = $this->getDateTimeOrNullValue($node->filterXPath('//buchungsdatum'));
$booking->travel = $this->getStringOrNullValue($node->filterXPath('//reise'));
$booking->travelId = $this->getIntOrNullValue($node->filterXPath('//idreise'));
$booking->travelDate = $this
->stringToDate($this->getStringOrNullValue($node->filterXPath('//reisedatum')));
$booking->hasDocuments = $this
->stringToBool($this->getStringOrNullValue($node->filterXPath('//reisedokument')));
$booking->payment = $this
->stringToFloat($this->getStringOrNullValue($node->filterXPath('//zahlung')));
$booking->hasDocuments = $this
->stringToBool($this->getStringOrNullValue($node->filterXPath('//reisedokument')));
$booking->travelDate = $this->getDateOrNullValue($node->filterXPath('//reisedatum'));
$booking->hasDocuments = $this->getBoolValue($node->filterXPath('//reisedokument'));
$booking->payment = $this->getFloatOrNullValue($node->filterXPath('//zahlung'));
$booking->hasDocuments = $this->getBoolValue($node->filterXPath('//reisedokument'));
$bookings[] = $booking;
});