示例#1
0
 /**
  * Commit current batch
  * 
  * @return Zend_Http_Response
  * @throws Zend_Service_WindowsAzure_Exception
  */
 public function commit()
 {
     // Perform batch
     $response = $this->_storageClient->performBatch($this->_operations, $this->_forTableStorage, $this->_isSingleSelect);
     // Dispose
     $this->_clean();
     // Parse response
     $errors = null;
     preg_match_all('/<message (.*)>(.*)<\\/message>/', $response->getBody(), $errors);
     // Error?
     if (count($errors[2]) > 0) {
         throw new Zend_Service_WindowsAzure_Exception('An error has occured while committing a batch: ' . $errors[2][0]);
     }
     // Return
     return $response;
 }