public function save()
    {
        try {
            if (isset($this->data['_id'])) {
                $this->data = array_merge($this->data, $this->chill->put($this->_id, $this->data));
            } else {
                $this->data = array_merge($this->data, $this->chill->post($this->data));
            }

            return true;
        } catch (Chill\Exception $ex) {
            return false;
        }
    }
public function save()
    {
        try {
            if (isset($this->data['_id'])) {
                $this->data = array_merge($this->data, $this->chill->put($this->_id, $this->data));
            } else {
                $this->data = array_merge($this->data, $this->chill->post($this->data));
            }

            return true;
        } catch (Chill\Exception $ex) {
            return false;
        }
    }
public function save ( ) { try { if ( isset ( $ this -> data [ '_id' ] ) ) { $ this -> data = array_merge ( $ this -> data , $ this -> chill -> put ( $ this -> _id , $ this -> data ) ) ; } else { $ this -> data = array_merge ( $ this -> data , $ this -> chill -> post ( $ this -> data ) ) ; } return true ; } catch ( Chill \ Exception $ ex ) { return false ; } }
Save this document, either by updating the document that already exists, or creating. Based on presence of _id.

@return bool
Save this document either by updating the document that already exists or creating . Based on presence of _id .