web/lib/Zend/Service/WindowsAzure/Credentials/SharedAccessSignature.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
equal deleted inserted replaced
805:5e7a0fedabdf 807:877f952ae2bd
    12  * obtain it through the world-wide-web, please send an email
    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.
    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  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    17  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    18  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    19  * @version    $Id: SharedAccessSignature.php 22773 2010-08-03 07:18:27Z maartenba $
    19  * @version    $Id: SharedAccessSignature.php 24593 2012-01-05 20:35:02Z matthew $
    20  */
    20  */
    21 
    21 
    22 /**
    22 /**
    23  * @see Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
    23  * @see Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
    24  */
    24  */
    25 require_once 'Zend/Service/WindowsAzure/Credentials/CredentialsAbstract.php';
    25 require_once 'Zend/Service/WindowsAzure/Credentials/CredentialsAbstract.php';
    26 
    26 
    27 /**
    27 /**
    28  * @see Zend_Service_WindowsAzure_Storage
       
    29  */
       
    30 require_once 'Zend/Service/WindowsAzure/Storage.php';
       
    31 
       
    32 /**
       
    33  * @see Zend_Http_Client
       
    34  */
       
    35 require_once 'Zend/Http/Client.php';
       
    36 
       
    37 /**
       
    38  * @category   Zend
    28  * @category   Zend
    39  * @package    Zend_Service_WindowsAzure
    29  * @package    Zend_Service_WindowsAzure
    40  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    30  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    41  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    31  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    42  */ 
    32  */ 
    43 class Zend_Service_WindowsAzure_Credentials_SharedAccessSignature
    33 class Zend_Service_WindowsAzure_Credentials_SharedAccessSignature
    44     extends Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
    34     extends Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
    45 {
    35 {
    91 	 */
    81 	 */
    92     public function setPermissionSet($value = array())
    82     public function setPermissionSet($value = array())
    93 	{
    83 	{
    94 		foreach ($value as $url) {
    84 		foreach ($value as $url) {
    95 			if (strpos($url, $this->_accountName) === false) {
    85 			if (strpos($url, $this->_accountName) === false) {
       
    86 				require_once 'Zend/Service/WindowsAzure/Exception.php';
    96 				throw new Zend_Service_WindowsAzure_Exception('The permission set can only contain URLs for the account name specified in the Zend_Service_WindowsAzure_Credentials_SharedAccessSignature instance.');
    87 				throw new Zend_Service_WindowsAzure_Exception('The permission set can only contain URLs for the account name specified in the Zend_Service_WindowsAzure_Credentials_SharedAccessSignature instance.');
    97 			}
    88 			}
    98 		}
    89 		}
    99 	    $this->_permissionSet = $value;
    90 	    $this->_permissionSet = $value;
   100 	}
    91 	}