<?php
 namespace App\ImportedOrder\Parser; abstract class Xml_GeneralAbstract { protected $xml; protected $order; protected $messagesCollector; public function __construct(\SimpleXMLElement $xml, ?\App\ImportedOrder\Order $order=null) { $this->xml = $xml; if ($order) { $this->order = $order; } else { $this->order = new \App\ImportedOrder\Order(); } $this->messagesCollector = new \App\MessagesCollector(); } abstract public function createImportedOrder() ; public function getImportedOrder() { return $this->order; } }