GetLocationResult.php 635 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace OSS\Result;
  3. use OSS\Core\OssException;
  4. /**
  5. * Class GetLocationResult getBucketLocation interface returns the result class, encapsulated
  6. * The returned xml data is parsed
  7. *
  8. * @package OSS\Result
  9. */
  10. class GetLocationResult extends Result
  11. {
  12. /**
  13. * Parse data from response
  14. *
  15. * @return string
  16. * @throws OssException
  17. */
  18. protected function parseDataFromResponse()
  19. {
  20. $content = $this->rawResponse->body;
  21. if (empty($content)) {
  22. throw new OssException("body is null");
  23. }
  24. $xml = simplexml_load_string($content);
  25. return $xml;
  26. }
  27. }