提交服务端基础框架

This commit is contained in:
wanghao
2025-03-12 12:18:06 +08:00
parent b2dc631969
commit 7c1b4f1a4f
11794 changed files with 3510099 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?php
namespace OSS\Result;
use OSS\Core\OssException;
use OSS\Model\BucketInfo;
/**
* Class GetBucketResult interface returns the result class, encapsulated
* The returned xml data is parsed
*
* @package OSS\Result
*/
class GetBucketInfoResult extends Result
{
/**
* Parse data from response
*
* @return string
* @throws OssException
*/
protected function parseDataFromResponse()
{
$content = $this->rawResponse->body;
if (empty($content)) {
throw new OssException("body is null");
}
$xml = simplexml_load_string($content);
if (isset($xml->Bucket)) {
$info = new BucketInfo();
$info->parseFromXmlNode($xml->Bucket);
return $info;
} else {
throw new OssException("xml format exception");
}
}
}