ObjectInfo.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?php
  2. namespace OSS\Model;
  3. /**
  4. *
  5. * Class ObjectInfo
  6. *
  7. * The element type of ObjectListInfo, which is the return value type of listObjects
  8. *
  9. * The return value of listObjects includes two arrays
  10. * One is the returned ObjectListInfo, which is similar to a file list in a file system.
  11. * The other is the returned prefix list, which is similar to a folder list in a file system.
  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. }