wip: service descriptions and car license plate field
This commit is contained in:
@@ -136,6 +136,12 @@ class TravelParser extends AbstractParser
|
||||
->stringToFloat($this->getStringOrNullValue($serviceNode->filterXPath('//preis')));
|
||||
$service->status = $this->getStringOrNullValue($serviceNode->filterXPath('//status'));
|
||||
|
||||
// Parse optional description from hinweis node
|
||||
$description = $this->getStringOrNullValue($serviceNode->filterXPath('//hinweis'));
|
||||
if (null !== $description && '' !== trim($description)) {
|
||||
$service->description = $description;
|
||||
}
|
||||
|
||||
// Parse age constraints
|
||||
$this->parseServiceAgeConstraints($serviceNode, $service);
|
||||
|
||||
@@ -173,6 +179,12 @@ class TravelParser extends AbstractParser
|
||||
$service->direction = $this->getStringOrNullValue($serviceNode->filterXPath('//richtung'));
|
||||
$service->status = $this->getStringOrNullValue($serviceNode->filterXPath('//status'));
|
||||
|
||||
// Parse optional description from hinweis node
|
||||
$description = $this->getStringOrNullValue($serviceNode->filterXPath('//hinweis'));
|
||||
if (null !== $description && '' !== trim($description)) {
|
||||
$service->description = $description;
|
||||
}
|
||||
|
||||
if (null !== $timeFrom = $serviceNode->attr('uhrzeit_von')) {
|
||||
$service->timeFrom = $timeFrom;
|
||||
$service->dayTime = (new DayTimeUtility())->mapTime($timeFrom);
|
||||
|
||||
Reference in New Issue
Block a user