File indexing completed on 2025-01-12 05:22:25
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Service_WindowsAzure 0017 * @subpackage Storage 0018 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0019 * @license http://framework.zend.com/license/new-bsd New BSD License 0020 * @version $Id$ 0021 */ 0022 0023 0024 /** 0025 * @category Zend 0026 * @package Zend_Service_WindowsAzure 0027 * @subpackage Storage 0028 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0029 * @license http://framework.zend.com/license/new-bsd New BSD License 0030 * 0031 * @property string $Name Name of the container 0032 * @property string $Etag Etag of the container 0033 * @property string $LastModified Last modified date of the container 0034 * @property array $Metadata Key/value pairs of meta data 0035 */ 0036 class Zend_Service_WindowsAzure_Storage_BlobContainer 0037 { 0038 /** 0039 * Data 0040 * 0041 * @var array 0042 */ 0043 protected $_data = null; 0044 0045 /** 0046 * Constructor 0047 * 0048 * @param string $name Name 0049 * @param string $etag Etag 0050 * @param string $lastModified Last modified date 0051 * @param array $metadata Key/value pairs of meta data 0052 */ 0053 public function __construct($name, $etag, $lastModified, $metadata = array()) 0054 { 0055 $this->_data = array( 0056 'name' => $name, 0057 'etag' => $etag, 0058 'lastmodified' => $lastModified, 0059 'metadata' => $metadata 0060 ); 0061 } 0062 0063 /** 0064 * Magic overload for setting properties 0065 * 0066 * @param string $name Name of the property 0067 * @param string $value Value to set 0068 */ 0069 public function __set($name, $value) { 0070 if (array_key_exists(strtolower($name), $this->_data)) { 0071 $this->_data[strtolower($name)] = $value; 0072 return; 0073 } 0074 0075 throw new Exception("Unknown property: " . $name); 0076 } 0077 0078 /** 0079 * Magic overload for getting properties 0080 * 0081 * @param string $name Name of the property 0082 */ 0083 public function __get($name) { 0084 if (array_key_exists(strtolower($name), $this->_data)) { 0085 return $this->_data[strtolower($name)]; 0086 } 0087 0088 throw new Exception("Unknown property: " . $name); 0089 } 0090 }