Esempio n. 1
0
 /**
  * Edit attributes of a document.
  *
  * @param   object  $doc    Services_HyperEstraier_Document
  *                          which is a document object.
  * @return  bool    True if success, else false.
  * @access  public
  */
 public function editDocument(Services_HyperEstraier_Document $doc)
 {
     $this->_status = -1;
     if (!$this->_url) {
         return false;
     }
     $turl = $this->_url . '/edit_doc';
     $reqheads = array('content-type' => 'text/x-estraier-draft');
     $reqbody = $doc->dumpDraft();
     $res = Services_HyperEstraier_Utility::shuttleUrl($turl, $this->_auth, $this->_pxhost, $this->_pxport, $this->_timeout, $reqheads, $reqbody);
     if (!$res) {
         return false;
     }
     $this->_status = $res->getResponseCode();
     return $res->isSuccess();
 }