@@ 193-196 (lines=4) @@ | ||
190 | { |
|
191 | $this->schemaValidate($string); |
|
192 | $xpath = $this->getPayloadAsXPath($string); |
|
193 | foreach ($this->extractionPaths as $property => $path) { |
|
194 | $value = $xpath->evaluate($path); |
|
195 | $this->$property = ($property === self::PROPERTY_ORDER_CREATE_TIMESTAMP) ? new DateTime($value) : $value; |
|
196 | } |
|
197 | return $this; |
|
198 | } |
|
199 |
@@ 218-221 (lines=4) @@ | ||
215 | */ |
|
216 | protected function deserializeDatetime(\DOMXPath $xpath) |
|
217 | { |
|
218 | foreach ($this->datetimeExtractionPaths as $property => $path) { |
|
219 | $value = $xpath->evaluate($path); |
|
220 | $this->$property = $value ? new DateTime($value) : null; |
|
221 | } |
|
222 | ||
223 | return $this; |
|
224 | } |