CopyObjectResult.php 592 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace OSS\Result;
  3. /**
  4. * Class CopyObjectResult
  5. * @package OSS\Result
  6. */
  7. class CopyObjectResult extends Result
  8. {
  9. /**
  10. * @return array()
  11. */
  12. protected function parseDataFromResponse()
  13. {
  14. $body = $this->rawResponse->body;
  15. $xml = simplexml_load_string($body);
  16. $result = array();
  17. if (isset($xml->LastModified)) {
  18. $result[] = $xml->LastModified;
  19. }
  20. if (isset($xml->ETag)) {
  21. $result[] = $xml->ETag;
  22. }
  23. return array_merge($result, $this->rawResponse->header);
  24. }
  25. }