HPCloud-PHP  1.2.0
PHP bindings for HPCloud and OpenStack services.
 All Classes Namespaces Files Functions Variables Pages
oo-tutorial-code.php File Reference

Go to the source code of this file.

Variables

 $ini = parse_ini_file(getenv('HOME') . '/.hpcloud.ini')
 $account = $ini['account']
 $key = $ini['secret']
 $tenantId = $ini['tenantId']
 $endpoint = $ini['url']
 $idService = new IdentityServices($endpoint)
 $token = $idService->authenticateAsAccount($account, $key, $tenantId)
 $catalog = $idService->serviceCatalog()
 $store = ObjectStorage::newFromServiceCatalog($catalog, $token)
 $container = $store->container('Example')
 $name = 'hello.txt'
 $content = 'Hello World'
 $mime = 'text/plain'
 $localObject = new Object($name, $content, $mime)
 $object = $container->object('hello.txt')

Variable Documentation

$catalog = $idService->serviceCatalog()
$content = 'Hello World'
$idService = new IdentityServices($endpoint)

Definition at line 18 of file oo-tutorial-code.php.

$ini = parse_ini_file(getenv('HOME') . '/.hpcloud.ini')

Definition at line 12 of file oo-tutorial-code.php.

$localObject = new Object($name, $content, $mime)

Definition at line 32 of file oo-tutorial-code.php.

$mime = 'text/plain'

Definition at line 30 of file oo-tutorial-code.php.

$object = $container->object('hello.txt')
$store = ObjectStorage::newFromServiceCatalog($catalog, $token)
$token = $idService->authenticateAsAccount($account, $key, $tenantId)