HPCloud-PHP
1.2.0
PHP bindings for HPCloud and OpenStack services.
|
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') |
$account = $ini['account'] |
Definition at line 13 of file oo-tutorial-code.php.
Referenced by ACL\addAccount(), StreamWrapper\authenticate(), IdentityServices\authenticateAsAccount(), Bootstrap\identity(), StreamWrapper\initializeObjectStorage(), and ObjectStorage\newFromSwiftAuth().
$catalog = $idService->serviceCatalog() |
Definition at line 21 of file oo-tutorial-code.php.
Referenced by StreamWrapper\initializeCDN(), DBaaS\newFromIdentity(), ObjectStorage\newFromServiceCatalog(), and CDN\newFromServiceCatalog().
$container = $store->container('Example') |
Definition at line 26 of file oo-tutorial-code.php.
Referenced by CDN\container(), ObjectStorage\container(), ObjectStorage\containers(), Container\copy(), StreamWrapper\dir_opendir(), StreamWrapper\generateStat(), ObjectStorage\hasContainer(), Container\newFromJSON(), Container\newFromResponse(), StreamWrapper\rename(), StreamWrapperFS\testDirectoryExists(), StreamWrapper\unlink(), and StreamWrapper\url_stat().
$content = 'Hello World' |
Definition at line 29 of file oo-tutorial-code.php.
Referenced by Object\__construct(), Object\content(), RemoteObject\content(), and Object\setContent().
$endpoint = $ini['url'] |
Definition at line 16 of file oo-tutorial-code.php.
Referenced by Instance\__construct(), Flavor\__construct(), Snapshot\__construct(), DBaaS\__construct(), CDN\__construct(), StreamWrapper\initializeObjectStorage(), DBaaS\newFromIdentity(), ObjectStorage\newFromServiceCatalog(), and CDN\newFromServiceCatalog().
$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.
$key = $ini['secret'] |
Definition at line 14 of file oo-tutorial-code.php.
Referenced by StreamWrapper\authenticate(), IdentityServices\authenticateAsAccount(), ObjectStorage\cdnUrl(), Container\extractHeaderAttributes(), Container\generateMetadataHeaders(), StreamWrapper\initializeObjectStorage(), ObjectStorage\newFromSwiftAuth(), StreamWrapper\parseUrl(), and RemoteObject\removeHeaders().
$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.
$name = 'hello.txt' |
Definition at line 28 of file oo-tutorial-code.php.
Referenced by FlavorDetails\__construct(), InstanceDetails\__construct(), Object\__construct(), Container\__construct(), ObjectStorage\changeContainerACL(), Bootstrap\config(), CDN\container(), ObjectStorage\container(), Container\copy(), Instance\create(), Snapshot\create(), ObjectStorage\createContainer(), StreamWrapper\cxt(), CDN\delete(), Container\delete(), ObjectStorage\deleteContainer(), CDN\enable(), RemoteObject\filterHeaders(), Flavor\getFlavorByName(), Bootstrap\hasConfig(), ObjectStorage\hasContainer(), Response\header(), CDN\modifyContainer(), FlavorDetails\name(), InstanceDetails\name(), Object\name(), Container\name(), RemoteObject\newFromHeaders(), Container\newFromResponse(), Container\object(), Response\parseHeaders(), Container\proxyObject(), Container\remoteObject(), RemoteObject\setHeaders(), CURLTransport\setHeaders(), Object\setName(), PHPStreamTransport\smashHeaders(), StreamWrapper\unlink(), CDN\update(), ObjectStorage\updateContainer(), and StreamWrapper\url_stat().
$object = $container->object('hello.txt') |
Definition at line 35 of file oo-tutorial-code.php.
Referenced by StreamWrapper\generateStat(), RemoteObject\newFromHeaders(), RemoteObject\newFromJSON(), and StreamWrapper\rename().
$store = ObjectStorage::newFromServiceCatalog($catalog, $token) |
Definition at line 23 of file oo-tutorial-code.php.
Referenced by ObjectStorage\newFromSwiftAuth(), and StreamWrapper\objectStorage().
$tenantId = $ini['tenantId'] |
Definition at line 15 of file oo-tutorial-code.php.
Referenced by StreamWrapper\authenticate(), IdentityServices\authenticateAsAccount(), IdentityServices\authenticateAsUser(), StreamWrapper\initializeObjectStorage(), IdentityServices\rescope(), and IdentityServices\rescopeUsingTenantId().
$token = $idService->authenticateAsAccount($account, $key, $tenantId) |
Definition at line 19 of file oo-tutorial-code.php.
Referenced by IdentityServices\rescopeUsingTenantId(), IdentityServices\rescopeUsingTenantName(), and IdentityServices\tenants().