Caution: The documentation you are viewing is
for an older version of Zend Framework.
You can find the documentation of the current version at docs.zendframework.com
Zend\Service\Rackspace — Zend Framework 2 2.0.7 documentation
The ZendService\Rackspace is a class that provides a simple API to manage the Rackspace services Cloud Files and Cloud Servers.
Load balancers service
The load balancers service of Rackspace is not implemented yet. We are planning to release it in the next future.
Before you can get started with ZendService\Rackspace, you must first register for an account. Please see the Cloud services page on the Rackspace website for more information.
After registering, you can get the Username and the API Key from the Rackspace management console under the menu “Your Account” > “API Access”. These informations are required to use the ZendService\Rackspace classes.
The Cloud Files is a service to store any files in a cloud environment. A user can store an unlimited quantity of files and each file can be as large as 5 gigabytes. The files can be private or public. The private files can be accessed using the API of Rackspace. The public files are accessed using a CDN (Content Delivery Network). Rackspace exposes a REST API to manage the Cloud Files.
ZendService\Rackspace\Files provides the following functionality:
- Upload files programmatically for tight integration with your application
- Enable Cloud Files CDN integration on any container for public distribution
- Create Containers programmatically
- Retrieve lists of containers and files
Rackspace Cloud Servers is a compute service that provides server capacity in the cloud. Cloud Servers come in different flavors of memory, disk space, and CPU.
ZendService\Rackspace\Servers provides the following functionality:
- Create/delete new servers
- List and get information on each server
- Manage the public/private IP addresses of a server
- Resize the server capacity
- Reboot a server
- Create new images for a server
- Manage the backup of a server
- Create a group of server to share the IP addresses for High Availability architecture
Eeach service class (Files, Servers) of Rackspace extends the ZendService\Rackspace abstract class. This class contains a set of public methods shared with all the service. This public methods are reported as follow:
Authenticate the Rackspace API using the user and the key specified in the concrete class that extend ZendService\Rackspace. Return true in case of success and false in case of error.
Get the authentication URL of Rackspace. Returns a string.
Get the URL for the CDN. Returns a string.
Get the last HTTP error code. Returns a string.
Get the last error message. Returns a string.
Get the HTTP client used to call the API of the Rackspace. Returns a Zend\Http\Client instance.
Get the authentication key. Returns a string.
Get the URL for the management services. Returns a string.
Get the URL for the storage (files) service. Returns a string.
Get the token returned after a successful authentication. Returns a string.
Get the user authenticated with the Rackspace service. Returns a string.
Return true if the last service call was successful, false otherwise.
Set the authentication URL to be used.
$url is the URL for the authentication
Set the key for the API authentication.
$key is the key string for the authentication
Set the user for the API authentication.
$user is the user string for the authentication