public function flush() { parent::flush(); $storageData = $this->readEntityData(); foreach ($this->dataToStore as $id => $data) { $storageData[$id] = $data; } $this->saveEntityData($storageData); $this->dataToStore = []; }