AppendResult.php 570 B

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