public function resetData(array $data)
    {
        $this->data = $data;
        if ($this->existsKey('uid')) {
            if (!$this->hasUid()) {
                $this->setUid((int)$this->data['uid']);
            }
            unset($this->data['uid']);
        }

        $this->markAsLoaded();
        if ($this->hasUid()) {
            $this->markAsClean();
        } else {
            $this->markAsDirty();
        }
    }
public function resetData(array $data)
    {
        $this->data = $data;
        if ($this->existsKey('uid')) {
            if (!$this->hasUid()) {
                $this->setUid((int)$this->data['uid']);
            }
            unset($this->data['uid']);
        }

        $this->markAsLoaded();
        if ($this->hasUid()) {
            $this->markAsClean();
        } else {
            $this->markAsDirty();
        }
    }
public function resetData ( array $ data ) { $ this -> data = $ data ; if ( $ this -> existsKey ( 'uid' ) ) { if ( ! $ this -> hasUid ( ) ) { $ this -> setUid ( ( int ) $ this -> data [ 'uid' ] ) ; } unset ( $ this -> data [ 'uid' ] ) ; } $ this -> markAsLoaded ( ) ; if ( $ this -> hasUid ( ) ) { $ this -> markAsClean ( ) ; } else { $ this -> markAsDirty ( ) ; } }
Sets the complete data for this model.

This function may be called more than once.

@param array $data the data for this model, may be empty

@return void
Sets the complete data for this model .