2012-03-15 11:07:54 -05:00
2011-12-16 12:33:25 -06:00
2011-12-16 12:33:25 -06:00
2012-02-10 13:49:32 -06:00
API
2011-12-16 12:33:25 -06:00
2011-12-21 14:54:03 -06:00
2012-02-08 14:01:44 -06:00
2012-03-15 11:07:23 -05:00
2011-12-16 12:33:25 -06:00
2012-01-27 18:59:36 -06:00
2012-02-21 13:59:15 -06:00
2012-03-14 11:22:17 -05:00
2012-01-04 09:38:37 -06:00
2011-12-16 12:33:25 -06:00
2011-12-22 12:10:49 -06:00

HPCloud-PHP

This package provides PHP OpenStack bindings for the HP Cloud.

You can use this library to:

  • Authenticate your application to the HP Cloud.
  • Interact with Object Storage (aka Swift).

Coming soon:

  • Intect with the Compute (Nova) manager.
  • Interact with other HP Cloud services

Requirements

  • PHP 5.3
  • An active HPCloud account with the desired services.

Suggestions

  • Enable the cURL extension for full protocol support.

Installation

There are two methods for installing HPCloud-PHP. You may manually install, or you may use the PEAR installer.

Usage

Importing the Library

The HPCloud PHP library follows the PHP 5.3 recommended practices for including and loading. In short: Use an autoloader.

Autoloading

HPCloud is PSR-0 compliant, which means that it should work with any PSR-0 autoloader. However, it also comes with its own autoloader for apps that don't yet make use of a standard autoloader.

PSR-0 Autoloading

For any PSR-0 autoloader, just ensure that the HPCloud directory (in src) is available in your PHP include path. A PSR-0 autoloader can take it from there.

Using the Built-In Autoloader

If your project does not include its own autoloader, you can use the one that comes built-in. This is not a full autoloader. It's a special-purpose one that works only for the HPCloud source (and this is by design -- it's supposed to play nicely with other autoloaders).

To use it, you can do the following:

<?php
require_once 'HPCloud/Bootstrap.php';

\HPCloud\Bootstrap::useAutoloader();
?>

This will register the autoloader as an SPL autoloader. From here, HPCloud classes should "just work", with no further require statements necessary.

You can see this in action in test/TestCase.php, the base class for unit tests.

Authenticating

As the Component Services framework is rolled out, a unified authentication layer will become available.

Prior to that, however, each service may have its own authentication.

Working with Object Storage

The central class for Object Storage is, appropriately enough, \HPCloud\Storage\ObjectStorage.

More information

HP Cloud is a cloud computing platform that provides many services, inlcuding compute installs, object and block storage, and a host of hosted services.

This library provides access to those services.


HPCloud-PHP is maintained by HP Cloud Services.

Description
RETIRED, OpenStack SDK for PHP
Readme 1.3 MiB