public function update($pos, $val) { if ($this->fileWrite == false) { //if not saving changes to file if (file_put_contents($this->walPath, '1;' . $pos . ';' . $val . PHP_EOL, FILE_APPEND) === false) { return false; } else { if (++$this->opNumber > $this->maxOps) { return $this->saveLoggedData($this->dbFileVer); } } } return parent::update($pos, $val); }