public function apply_changes() { $this->data = array_merge($this->data, $this->changes); $this->changes = array(); }