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.
29 lines
737 B
29 lines
737 B
![]()
2 months ago
|
<?php
|
||
|
|
||
|
include_once dirname(dirname(__FILE__)). "/Core/OssException.php";
|
||
|
|
||
|
/**
|
||
|
* The type of the return value of getBucketAcl, it wraps the data parsed from xml.
|
||
|
*
|
||
|
* @package OSS\Result
|
||
|
*/
|
||
|
class AclResult extends Result
|
||
|
{
|
||
|
/**
|
||
|
* @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->AccessControlList->Grant)) {
|
||
|
return strval($xml->AccessControlList->Grant);
|
||
|
} else {
|
||
|
throw new OssException("xml format exception");
|
||
|
}
|
||
|
}
|
||
|
}
|