BlobInstance.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Service_WindowsAzure
  17. * @subpackage Storage
  18. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id$
  21. */
  22. /**
  23. * @see Zend_Service_WindowsAzure_Storage_StorageEntityAbstract
  24. */
  25. require_once 'Zend/Service/WindowsAzure/Storage/StorageEntityAbstract.php';
  26. /**
  27. * @category Zend
  28. * @package Zend_Service_WindowsAzure
  29. * @subpackage Storage
  30. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  31. * @license http://framework.zend.com/license/new-bsd New BSD License
  32. *
  33. * @property string $Container The name of the blob container in which the blob is stored.
  34. * @property string $Name The name of the blob.
  35. * @property string $SnapshotId The blob snapshot ID if it is a snapshot blob (= a backup copy of a blob).
  36. * @property string $Etag The entity tag, used for versioning and concurrency.
  37. * @property string $LastModified Timestamp when the blob was last modified.
  38. * @property string $Url The full URL where the blob can be downloaded.
  39. * @property int $Size The blob size in bytes.
  40. * @property string $ContentType The blob content type header.
  41. * @property string $ContentEncoding The blob content encoding header.
  42. * @property string $ContentLanguage The blob content language header.
  43. * @property string $CacheControl The blob cache control header.
  44. * @property string $BlobType The blob type (block blob / page blob).
  45. * @property string $LeaseStatus The blob lease status.
  46. * @property boolean $IsPrefix Is it a blob or a directory prefix?
  47. * @property array $Metadata Key/value pairs of meta data
  48. */
  49. class Zend_Service_WindowsAzure_Storage_BlobInstance
  50. extends Zend_Service_WindowsAzure_Storage_StorageEntityAbstract
  51. {
  52. /**
  53. * Constructor
  54. *
  55. * @param string $containerName Container name
  56. * @param string $name Name
  57. * @param string $snapshotId Snapshot id
  58. * @param string $etag Etag
  59. * @param string $lastModified Last modified date
  60. * @param string $url Url
  61. * @param int $size Size
  62. * @param string $contentType Content Type
  63. * @param string $contentEncoding Content Encoding
  64. * @param string $contentLanguage Content Language
  65. * @param string $cacheControl Cache control
  66. * @param string $blobType Blob type
  67. * @param string $leaseStatus Lease status
  68. * @param boolean $isPrefix Is Prefix?
  69. * @param array $metadata Key/value pairs of meta data
  70. */
  71. public function __construct($containerName, $name, $snapshotId, $etag, $lastModified, $url = '', $size = 0, $contentType = '', $contentEncoding = '', $contentLanguage = '', $cacheControl = '', $blobType = '', $leaseStatus = '', $isPrefix = false, $metadata = array())
  72. {
  73. $this->_data = array(
  74. 'container' => $containerName,
  75. 'name' => $name,
  76. 'snapshotid' => $snapshotId,
  77. 'etag' => $etag,
  78. 'lastmodified' => $lastModified,
  79. 'url' => $url,
  80. 'size' => $size,
  81. 'contenttype' => $contentType,
  82. 'contentencoding' => $contentEncoding,
  83. 'contentlanguage' => $contentLanguage,
  84. 'cachecontrol' => $cacheControl,
  85. 'blobtype' => $blobType,
  86. 'leasestatus' => $leaseStatus,
  87. 'isprefix' => $isPrefix,
  88. 'metadata' => $metadata
  89. );
  90. }
  91. }