Zend Framework
1.12
|
Public Member Functions | |
__construct ($user, $key, $authUrl=self::US_AUTH_URL) | |
Constructor. | |
getUser () | |
Get User account. | |
getKey () | |
Get user key. | |
getAuthUrl () | |
Get authentication URL. | |
getStorageUrl () | |
Get the storage URL. | |
getCdnUrl () | |
Get the CDN URL. | |
getManagementUrl () | |
Get the management server URL. | |
setUser ($user) | |
Set the user account. | |
setKey ($key) | |
Set the authentication key. | |
setAuthUrl ($url) | |
Set the Authentication URL. | |
setServiceNet ($useServiceNet=true) | |
Sets whether to use ServiceNet. | |
getServiceNet () | |
Get whether we're using ServiceNet. | |
getToken () | |
Get the authentication token. | |
getErrorMsg () | |
Get the error msg of the last HTTP call. | |
getErrorCode () | |
Get the error code of the last HTTP call. | |
getHttpClient () | |
get the HttpClient instance | |
isSuccessful () | |
Return true is the last call was successful. | |
authenticate () | |
Authentication. | |
Public Attributes | |
const | VERSION = 'v1.0' |
const | US_AUTH_URL = 'https://auth.api.rackspacecloud.com' |
const | UK_AUTH_URL = 'https://lon.auth.api.rackspacecloud.com' |
const | API_FORMAT = 'json' |
const | USER_AGENT = 'Zend_Service_Rackspace' |
const | STORAGE_URL = "X-Storage-Url" |
const | AUTHTOKEN = "X-Auth-Token" |
const | AUTHUSER_HEADER = "X-Auth-User" |
const | AUTHKEY_HEADER = "X-Auth-Key" |
const | AUTHUSER_HEADER_LEGACY = "X-Storage-User" |
const | AUTHKEY_HEADER_LEGACY = "X-Storage-Pass" |
const | AUTHTOKEN_LEGACY = "X-Storage-Token" |
const | CDNM_URL = "X-CDN-Management-Url" |
const | MANAGEMENT_URL = "X-Server-Management-Url" |
Protected Member Functions | |
httpCall ($url, $method, $headers=array(), $data=array(), $body=null) | |
HTTP call. | |
Protected Attributes | |
$key | |
$user | |
$token | |
$authUrl | |
$httpClient | |
$errorMsg | |
$errorCode | |
$storageUrl | |
$cdnUrl | |
$managementUrl | |
$useServiceNet = false | |
__construct | ( | $user, | |
$key, | |||
$authUrl = self::US_AUTH_URL |
|||
) |
Constructor.
You must pass the account and the Rackspace authentication key. Optional: the authentication url (default is US)
string | $user | |
string | $key | |
string | $authUrl |
authenticate | ( | ) |
getAuthUrl | ( | ) |
Get authentication URL.
getCdnUrl | ( | ) |
Get the CDN URL.
getErrorCode | ( | ) |
Get the error code of the last HTTP call.
getErrorMsg | ( | ) |
Get the error msg of the last HTTP call.
getHttpClient | ( | ) |
get the HttpClient instance
getKey | ( | ) |
Get user key.
getManagementUrl | ( | ) |
Get the management server URL.
getServiceNet | ( | ) |
Get whether we're using ServiceNet.
getStorageUrl | ( | ) |
Get the storage URL.
getToken | ( | ) |
Get the authentication token.
getUser | ( | ) |
Get User account.
|
protected |
HTTP call.
string | $url | |
string | $method | |
array | $headers | |
array | $get | |
string | $body |
isSuccessful | ( | ) |
Return true is the last call was successful.
setAuthUrl | ( | $url | ) |
Set the Authentication URL.
string | $url |
setKey | ( | $key | ) |
Set the authentication key.
string | $key |
setServiceNet | ( | $useServiceNet = true | ) |
Sets whether to use ServiceNet.
ServiceNet is Rackspace's internal network. Bandwidth on ServiceNet is not charged.
boolean | $useServiceNet |
setUser | ( | $user | ) |
Set the user account.
string | $user |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
const API_FORMAT = 'json' |
const AUTHKEY_HEADER = "X-Auth-Key" |
const AUTHKEY_HEADER_LEGACY = "X-Storage-Pass" |
const AUTHTOKEN = "X-Auth-Token" |
const AUTHTOKEN_LEGACY = "X-Storage-Token" |
const AUTHUSER_HEADER = "X-Auth-User" |
const AUTHUSER_HEADER_LEGACY = "X-Storage-User" |
const CDNM_URL = "X-CDN-Management-Url" |
const MANAGEMENT_URL = "X-Server-Management-Url" |
const STORAGE_URL = "X-Storage-Url" |
const UK_AUTH_URL = 'https://lon.auth.api.rackspacecloud.com' |
const US_AUTH_URL = 'https://auth.api.rackspacecloud.com' |
const USER_AGENT = 'Zend_Service_Rackspace' |
const VERSION = 'v1.0' |