diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Service/WindowsAzure/Storage/BlobInstance.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Service/WindowsAzure/Storage/BlobInstance.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,132 @@ +_data = array( + 'container' => $containerName, + 'name' => $name, + 'snapshotid' => $snapshotId, + 'etag' => $etag, + 'lastmodified' => $lastModified, + 'url' => $url, + 'size' => $size, + 'contenttype' => $contentType, + 'contentencoding' => $contentEncoding, + 'contentlanguage' => $contentLanguage, + 'cachecontrol' => $cacheControl, + 'blobtype' => $blobType, + 'leasestatus' => $leaseStatus, + 'isprefix' => $isPrefix, + 'metadata' => $metadata + ); + } + + /** + * Magic overload for setting properties + * + * @param string $name Name of the property + * @param string $value Value to set + */ + public function __set($name, $value) { + if (array_key_exists(strtolower($name), $this->_data)) { + $this->_data[strtolower($name)] = $value; + return; + } + + throw new Exception("Unknown property: " . $name); + } + + /** + * Magic overload for getting properties + * + * @param string $name Name of the property + */ + public function __get($name) { + if (array_key_exists(strtolower($name), $this->_data)) { + return $this->_data[strtolower($name)]; + } + + throw new Exception("Unknown property: " . $name); + } +}