|
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 Management |
|
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 |
|
20 * @version $Id$ |
|
21 */ |
|
22 |
|
23 |
|
24 /** |
|
25 * @category Zend |
|
26 * @package Zend_Service_WindowsAzure |
|
27 * @subpackage Management |
|
28 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
|
29 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
30 */ |
|
31 abstract class Zend_Service_WindowsAzure_Management_ServiceEntityAbstract |
|
32 { |
|
33 /** |
|
34 * Data |
|
35 * |
|
36 * @var array |
|
37 */ |
|
38 protected $_data = null; |
|
39 |
|
40 /** |
|
41 * Magic overload for setting properties |
|
42 * |
|
43 * @param string $name Name of the property |
|
44 * @param string $value Value to set |
|
45 */ |
|
46 public function __set($name, $value) { |
|
47 if (array_key_exists(strtolower($name), $this->_data)) { |
|
48 $this->_data[strtolower($name)] = $value; |
|
49 return; |
|
50 } |
|
51 require_once 'Zend/Service/WindowsAzure/Management/Exception.php'; |
|
52 throw new Zend_Service_WindowsAzure_Management_Exception("Unknown property: " . $name); |
|
53 } |
|
54 |
|
55 /** |
|
56 * Magic overload for getting properties |
|
57 * |
|
58 * @param string $name Name of the property |
|
59 */ |
|
60 public function __get($name) { |
|
61 if (array_key_exists(strtolower($name), $this->_data)) { |
|
62 return $this->_data[strtolower($name)]; |
|
63 } |
|
64 require_once 'Zend/Service/WindowsAzure/Management/Exception.php'; |
|
65 throw new Zend_Service_WindowsAzure_Management_Exception("Unknown property: " . $name); |
|
66 } |
|
67 } |