Service/WindowsAzure/Credentials/CredentialsAbstract.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Service_WindowsAzure
- Version
- $Id$
\Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
Package: Zend_Service_WindowsAzure
- Children
- \Zend_Service_WindowsAzure_Credentials_SharedKey
- \Zend_Service_WindowsAzure_Credentials_SharedAccessSignature
- \Zend_Service_WindowsAzure_Credentials_SharedKeyLite
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
DEVSTORE_KEY
= "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="
Properties
Methods
__construct(string $accountName = \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT, string $accountKey = \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY, boolean $usePathStyleUri = false) : void
Creates a new Zend_Service_WindowsAzure_Credentials_CredentialsAbstract instance
Parameters
Name | Type | Description |
---|---|---|
$accountName | string | Account name for Windows Azure |
$accountKey | string | Account key for Windows Azure |
$usePathStyleUri | boolean | Use path-style URI's |
_issetOr(array $array, mixed $key, mixed $valueIfNotSet) : mixed
Returns an array value if the key is set, otherwide returns $valueIfNotSet
Parameters
Returns
Name | Type | Description |
---|---|---|
$array | array | |
$key | mixed | |
$valueIfNotSet | mixed |
Type | Description |
---|---|
mixed |
_makeArrayOfQueryString(string $value) : array
Make array of query string
Parameters
Returns
Name | Type | Description |
---|---|---|
$value | string | Query string |
Type | Description |
---|---|
array | Array of key/value pairs |
_prepareQueryStringForSigning(string $value) : string
Prepare query string for signing
Parameters
Returns
Name | Type | Description |
---|---|---|
$value | string | Original query string |
Type | Description |
---|---|
string | Query string for signing |
setAccountName(string $value = \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT) : \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
Set account name for Windows Azure
Parameters
Returns
Name | Type | Description |
---|---|---|
$value | string |
Type | Description |
---|---|
\Zend_Service_WindowsAzure_Credentials_CredentialsAbstract |
setAccountkey(string $value = \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY) : \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
Set account key for Windows Azure
Parameters
Returns
Name | Type | Description |
---|---|---|
$value | string |
Type | Description |
---|---|
\Zend_Service_WindowsAzure_Credentials_CredentialsAbstract |
setUsePathStyleUri(boolean $value = false) : \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
Set use path-style URI's
Parameters
Returns
Name | Type | Description |
---|---|---|
$value | boolean |
Type | Description |
---|---|
\Zend_Service_WindowsAzure_Credentials_CredentialsAbstract |
signRequestHeaders(string $httpVerb = \Zend_Http_Client::GET, string $path = '/', string $queryString = '', array $headers = null, boolean $forTableStorage = false, string $resourceType = \Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN, string $requiredPermission = \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ, mixed $rawData = null) : array
abstract
Sign request headers with credentials
Parameters
Returns
Name | Type | Description |
---|---|---|
$httpVerb | string | HTTP verb the request will use |
$path | string | Path for the request |
$queryString | string | Query string for the request |
$headers | array | x-ms headers to add |
$forTableStorage | boolean | Is the request for table storage? |
$resourceType | string | Resource type |
$requiredPermission | string | Required permission |
$rawData | mixed | Raw post data |
Type | Description |
---|---|
array | Array of headers |
signRequestUrl(string $requestUrl = '', string $resourceType = \Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN, string $requiredPermission = \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ) : string
abstract
Sign request URL with credentials
Parameters
Returns
Name | Type | Description |
---|---|---|
$requestUrl | string | Request URL |
$resourceType | string | Resource type |
$requiredPermission | string | Required permission |
Type | Description |
---|---|
string | Signed request URL |