name = $bootServer->getName(); $this->ip = $bootServer->getIp(); $this->apiPort = $bootServer->getApiPort(); $this->pxePort = $bootServer->getPxePort(); $this->comments = $bootServer->getComments(); } public function createOrUpdateEntity(?BootServer $bootServer = null): BootServer { if (!$bootServer) { $bootServer = new BootServer(); } $bootServer->setName($this->name); $bootServer->setIp($this->ip); $bootServer->setApiPort((int)$this->apiPort); $bootServer->setPxePort((int)$this->pxePort); $bootServer->setComments($this->comments); return $bootServer; } }