You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					27 lines
				
				610 B
			
		
		
			
		
	
	
					27 lines
				
				610 B
			|   
											8 months ago
										 | <?php | ||
|  | 
 | ||
|  | include_once dirname(dirname(__FILE__))."/Core/OssException.php"; | ||
|  | 
 | ||
|  | 
 | ||
|  | /** | ||
|  |  * Class initiateMultipartUploadResult | ||
|  |  * @package OSS\Result | ||
|  |  */ | ||
|  | class InitiateMultipartUploadResult extends Result | ||
|  | { | ||
|  |     /** | ||
|  |      * Get uploadId in result and return | ||
|  |      * | ||
|  |      * @throws OssException | ||
|  |      * @return string | ||
|  |      */ | ||
|  |     protected function parseDataFromResponse() | ||
|  |     { | ||
|  |         $content = $this->rawResponse->body; | ||
|  |         $xml = simplexml_load_string($content); | ||
|  |         if (isset($xml->UploadId)) { | ||
|  |             return strval($xml->UploadId); | ||
|  |         } | ||
|  |         throw new OssException("cannot get UploadId"); | ||
|  |     } | ||
|  | } |