13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Service_WindowsAzure |
16 * @package Zend_Service_WindowsAzure |
17 * @subpackage Storage |
17 * @subpackage Storage |
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: BlobInstance.php 22773 2010-08-03 07:18:27Z maartenba $ |
20 * @version $Id: BlobInstance.php 24593 2012-01-05 20:35:02Z matthew $ |
21 */ |
21 */ |
22 |
|
23 /** |
|
24 * @see Zend_Service_WindowsAzure_Exception |
|
25 */ |
|
26 require_once 'Zend/Service/WindowsAzure/Exception.php'; |
|
27 |
22 |
28 /** |
23 /** |
29 * @see Zend_Service_WindowsAzure_Storage_StorageEntityAbstract |
24 * @see Zend_Service_WindowsAzure_Storage_StorageEntityAbstract |
30 */ |
25 */ |
31 require_once 'Zend/Service/WindowsAzure/Storage/StorageEntityAbstract.php'; |
26 require_once 'Zend/Service/WindowsAzure/Storage/StorageEntityAbstract.php'; |
32 |
27 |
33 /** |
28 /** |
34 * @category Zend |
29 * @category Zend |
35 * @package Zend_Service_WindowsAzure |
30 * @package Zend_Service_WindowsAzure |
36 * @subpackage Storage |
31 * @subpackage Storage |
37 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
32 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
38 * @license http://framework.zend.com/license/new-bsd New BSD License |
33 * @license http://framework.zend.com/license/new-bsd New BSD License |
39 * |
34 * |
40 * @property string $Container Container name |
35 * @property string $Container The name of the blob container in which the blob is stored. |
41 * @property string $Name Name |
36 * @property string $Name The name of the blob. |
42 * @property string $SnapshotId Snapshot id |
37 * @property string $SnapshotId The blob snapshot ID if it is a snapshot blob (= a backup copy of a blob). |
43 * @property string $Etag Etag |
38 * @property string $Etag The entity tag, used for versioning and concurrency. |
44 * @property string $LastModified Last modified date |
39 * @property string $LastModified Timestamp when the blob was last modified. |
45 * @property string $Url Url |
40 * @property string $Url The full URL where the blob can be downloaded. |
46 * @property int $Size Size |
41 * @property int $Size The blob size in bytes. |
47 * @property string $ContentType Content Type |
42 * @property string $ContentType The blob content type header. |
48 * @property string $ContentEncoding Content Encoding |
43 * @property string $ContentEncoding The blob content encoding header. |
49 * @property string $ContentLanguage Content Language |
44 * @property string $ContentLanguage The blob content language header. |
50 * @property string $CacheControl Cache control |
45 * @property string $CacheControl The blob cache control header. |
51 * @property string $BlobType Blob type |
46 * @property string $BlobType The blob type (block blob / page blob). |
52 * @property string $LeaseStatus Lease status |
47 * @property string $LeaseStatus The blob lease status. |
53 * @property boolean $IsPrefix Is Prefix? |
48 * @property boolean $IsPrefix Is it a blob or a directory prefix? |
54 * @property array $Metadata Key/value pairs of meta data |
49 * @property array $Metadata Key/value pairs of meta data |
55 */ |
50 */ |
56 class Zend_Service_WindowsAzure_Storage_BlobInstance |
51 class Zend_Service_WindowsAzure_Storage_BlobInstance |
|
52 extends Zend_Service_WindowsAzure_Storage_StorageEntityAbstract |
57 { |
53 { |
58 /** |
|
59 * Data |
|
60 * |
|
61 * @var array |
|
62 */ |
|
63 protected $_data = null; |
|
64 |
|
65 /** |
54 /** |
66 * Constructor |
55 * Constructor |
67 * |
56 * |
68 * @param string $containerName Container name |
57 * @param string $containerName Container name |
69 * @param string $name Name |
58 * @param string $name Name |
99 'leasestatus' => $leaseStatus, |
88 'leasestatus' => $leaseStatus, |
100 'isprefix' => $isPrefix, |
89 'isprefix' => $isPrefix, |
101 'metadata' => $metadata |
90 'metadata' => $metadata |
102 ); |
91 ); |
103 } |
92 } |
104 |
|
105 /** |
|
106 * Magic overload for setting properties |
|
107 * |
|
108 * @param string $name Name of the property |
|
109 * @param string $value Value to set |
|
110 */ |
|
111 public function __set($name, $value) { |
|
112 if (array_key_exists(strtolower($name), $this->_data)) { |
|
113 $this->_data[strtolower($name)] = $value; |
|
114 return; |
|
115 } |
|
116 |
|
117 throw new Exception("Unknown property: " . $name); |
|
118 } |
|
119 |
|
120 /** |
|
121 * Magic overload for getting properties |
|
122 * |
|
123 * @param string $name Name of the property |
|
124 */ |
|
125 public function __get($name) { |
|
126 if (array_key_exists(strtolower($name), $this->_data)) { |
|
127 return $this->_data[strtolower($name)]; |
|
128 } |
|
129 |
|
130 throw new Exception("Unknown property: " . $name); |
|
131 } |
|
132 } |
93 } |