public function __construct(EventDispatcherInterface $eventDispatcher = null) { $this->eventDispatcher = $eventDispatcher ?: new EventDispatcher(); $this->nodes = new NodeMap(); $this->start = null; }