public function restore($key = null)
    {
        if (is_null($key)) {
            $mergedData         = array_merge($this->_DATA, $this->_originalDATA);
            $this->_DATA        = $this->_removeNewKeys($mergedData);
            $this->_dataChanged = false;
            $this->_newKeys     = [];
        } else {
            if (array_key_exists($key, $this->_originalDATA)) {
                $this->_DATA[$key] = $this->_originalDATA[$key];
            }
        }

        return $this;
    }
public function restore($key = null)
    {
        if (is_null($key)) {
            $mergedData         = array_merge($this->_DATA, $this->_originalDATA);
            $this->_DATA        = $this->_removeNewKeys($mergedData);
            $this->_dataChanged = false;
            $this->_newKeys     = [];
        } else {
            if (array_key_exists($key, $this->_originalDATA)) {
                $this->_DATA[$key] = $this->_originalDATA[$key];
            }
        }

        return $this;
    }
public function restore ( $ key = null ) { if ( is_null ( $ key ) ) { $ mergedData = array_merge ( $ this -> _DATA , $ this -> _originalDATA ) ; $ this -> _DATA = $ this -> _removeNewKeys ( $ mergedData ) ; $ this -> _dataChanged = false ; $ this -> _newKeys = [ ] ; } else { if ( array_key_exists ( $ key , $ this -> _originalDATA ) ) { $ this -> _DATA [ $ key ] = $ this -> _originalDATA [ $ key ] ; } } return $ this ; }
replace changed data by original data
set data changed to false only if restore whole data

@param string|null $key
@return $this
replace changed data by original data set data changed to false only if restore whole data