<?php
namespace App\Worldspan\LineParser\Types; class DateOrStar extends \App\Utils\BaseParser\TextParser\Types\Date { public function getSubregexp($options) { $subregexp = parent::getSubregexp($options); $subregexp = "{$subregexp}|(\*)"; return $subregexp; } public function getDate($matches, $options, $renamedPatternNames) { if ($matches[0]=='*') { return null; } return parent::getDate($matches, $options, $renamedPatternNames); } } 