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.

92 lines
1.7 KiB

6 years ago
  1. <?php
  2. namespace OSS\Model;
  3. /**
  4. *
  5. * Class ObjectInfo
  6. *
  7. * listObjects接口中返回的Object列表中的类
  8. *
  9. * listObjects接口返回数据中包含两个Array
  10. * 一个是拿到的Object列表【可以理解成对应文件系统中的文件列表】
  11. * 一个是拿到的Prefix列表【可以理解成对应文件系统中的目录列表】
  12. *
  13. * @package OSS\Model
  14. */
  15. class ObjectInfo
  16. {
  17. /**
  18. * ObjectInfo constructor.
  19. *
  20. * @param string $key
  21. * @param string $lastModified
  22. * @param string $eTag
  23. * @param string $type
  24. * @param int $size
  25. * @param string $storageClass
  26. */
  27. public function __construct($key, $lastModified, $eTag, $type, $size, $storageClass)
  28. {
  29. $this->key = $key;
  30. $this->lastModified = $lastModified;
  31. $this->eTag = $eTag;
  32. $this->type = $type;
  33. $this->size = $size;
  34. $this->storageClass = $storageClass;
  35. }
  36. /**
  37. * @return string
  38. */
  39. public function getKey()
  40. {
  41. return $this->key;
  42. }
  43. /**
  44. * @return string
  45. */
  46. public function getLastModified()
  47. {
  48. return $this->lastModified;
  49. }
  50. /**
  51. * @return string
  52. */
  53. public function getETag()
  54. {
  55. return $this->eTag;
  56. }
  57. /**
  58. * @return string
  59. */
  60. public function getType()
  61. {
  62. return $this->type;
  63. }
  64. /**
  65. * @return int
  66. */
  67. public function getSize()
  68. {
  69. return $this->size;
  70. }
  71. /**
  72. * @return string
  73. */
  74. public function getStorageClass()
  75. {
  76. return $this->storageClass;
  77. }
  78. private $key = "";
  79. private $lastModified = "";
  80. private $eTag = "";
  81. private $type = "";
  82. private $size = 0;
  83. private $storageClass = "";
  84. }