/** * Save changes for trackdata */ protected function saveChangesForTrackdata() { if (null === $this->Trackdata || $this->OldTrackdata->isEmpty()) { return; } $this->Trackdata->synchronize(); if ($this->Trackdata->isEmpty()) { $Deleter = new Model\Trackdata\Deleter($this->PDO, $this->Trackdata); $Deleter->setAccountID($this->AccountID); $Deleter->delete(); $this->Trackdata = null; } else { $Updater = new Model\Trackdata\Updater($this->PDO, $this->Trackdata, $this->OldTrackdata); $Updater->setAccountID($this->AccountID); $Updater->update(); } }