UploadPartResult.php 498 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace OSS\Result;
  3. use OSS\Core\OssException;
  4. /**
  5. * Class UploadPartResult
  6. * @package OSS\Result
  7. */
  8. class UploadPartResult extends Result
  9. {
  10. /**
  11. * 结果中part的ETag
  12. *
  13. * @return string
  14. * @throws OssException
  15. */
  16. protected function parseDataFromResponse()
  17. {
  18. $header = $this->rawResponse->header;
  19. if (isset($header["etag"])) {
  20. return $header["etag"];
  21. }
  22. throw new OssException("cannot get ETag");
  23. }
  24. }