Overview

Namespaces

  • OpenCloud
    • Autoscale
      • Resource
    • CloudMonitoring
      • Exception
      • Resource
    • Common
      • Collection
      • Constants
      • Exceptions
      • Http
        • Message
      • Identity
      • Log
      • Service
    • Compute
      • Constants
      • Exception
      • Resource
    • Database
      • Resource
    • DNS
      • Resource
    • LoadBalancer
      • Resource
    • ObjectStore
      • Constants
      • Exception
      • Resource
      • Upload
    • Orchestration
    • Queues
      • Exception
      • Resource
    • Volume
      • Resource
  • PHP

Classes

  • OpenStack
  • Rackspace
  • Overview
  • Namespace
  • Class
  • Tree
  • Download

Class OpenStack

The main client of the library. This object is the central point of negotiation between your application and the API because it handles all of the HTTP transactions required to perform operations. It also manages the services for your application through convenient factory methods.

Guzzle\Http\Client
Extended by OpenCloud\Common\Http\Client
Extended by OpenCloud\OpenStack

Direct known subclasses

OpenCloud\Rackspace
Namespace: OpenCloud
Located at OpenCloud/OpenStack.php
Methods summary
public
# __construct( mixed $url, array $secret, array $options = array() )

Overrides

OpenCloud\Common\Http\Client::__construct()
public mixed
# setSecret( array $secret = array() )

Set the credentials for the client

Set the credentials for the client

Parameters

$secret
array
$secret

Returns

mixed
$this
public array
# getSecret( )

Get the secret.

Get the secret.

Returns

array
public mixed
# setToken( string $token )

Set the token for this client.

Set the token for this client.

Parameters

$token
string
$token

Returns

mixed
$this
public string
# getToken( )

Get the token for this client.

Get the token for this client.

Returns

string
public mixed
# setExpiration( integer $expiration )

Set the expiration for this token.

Set the expiration for this token.

Parameters

$expiration
integer
$expiration

Returns

mixed
$this
public integer
# getExpiration( )

Get the expiration time.

Get the expiration time.

Returns

integer
public mixed
# setTenant( string $tenant )

Set the tenant for this client.

Set the tenant for this client.

Parameters

$tenant
string
$tenant

Returns

mixed
$this
public string
# getTenant( )

Get the tenant for this client.

Get the tenant for this client.

Returns

string
public mixed
# setCatalog( mixed $catalog )

Set the service catalog.

Set the service catalog.

Parameters

$catalog
mixed
$catalog

Returns

mixed
$this
public array
# getCatalog( )

Get the service catalog.

Get the service catalog.

Returns

array
public mixed
# setLogger( OpenCloud\Common\Log\LoggerInterface $logger )

Parameters

$logger
OpenCloud\Common\Log\LoggerInterface
$logger

Returns

mixed
$this
public OpenCloud\Common\Log\LoggerInterface
# getLogger( )

Returns

OpenCloud\Common\Log\LoggerInterface
public boolean
# hasExpired( )

Checks whether token has expired

Checks whether token has expired

Returns

boolean
public string
# getCredentials( )

Formats the credentials array (as a string) for authentication

Formats the credentials array (as a string) for authentication

Returns

string

Throws

OpenCloud\Common\Exceptions\CredentialError
public mixed
# setAuthUrl( mixed $url )

Parameters

$url
mixed
$url

Returns

mixed
$this
public Guzzle\Http\Url
# getAuthUrl( )

Returns

Guzzle\Http\Url
public
# authenticate( )

Authenticate the tenant using the supplied credentials

Authenticate the tenant using the supplied credentials

Throws

AuthenticationError
public array
# exportCredentials( )

Convenience method for exporting current credentials. Useful for local caching.

Convenience method for exporting current credentials. Useful for local caching.

Returns

array
public
# importCredentials( array $values )

Convenience method for importing credentials. Useful for local caching because it reduces HTTP traffic.

Convenience method for importing credentials. Useful for local caching because it reduces HTTP traffic.

Parameters

$values
array
$values
public OpenCloud\ObjectStore\Service
# objectStoreService( string $name = null, string $region = null, string $urltype = null )

Creates a new ObjectStore object (Swift/Cloud Files)

Creates a new ObjectStore object (Swift/Cloud Files)

Parameters

$name
string
$name The name of the service as it appears in the Catalog
$region
string
$region The region (DFW, IAD, ORD, LON, SYD)
$urltype
string
$urltype The URL type ("publicURL" or "internalURL")

Returns

OpenCloud\ObjectStore\Service
public OpenCloud\Compute\Service
# computeService( string $name = null, string $region = null, string $urltype = null )

Creates a new Compute object (Nova/Cloud Servers)

Creates a new Compute object (Nova/Cloud Servers)

Parameters

$name
string
$name The name of the service as it appears in the Catalog
$region
string
$region The region (DFW, IAD, ORD, LON, SYD)
$urltype
string
$urltype The URL type ("publicURL" or "internalURL")

Returns

OpenCloud\Compute\Service
public OpenCloud\Orchestration\Service
# orchestrationService( string $name = null, string $region = null, string $urltype = null )

Creates a new Orchestration (Heat) service object

Creates a new Orchestration (Heat) service object

Parameters

$name
string
$name The name of the service as it appears in the Catalog
$region
string
$region The region (DFW, IAD, ORD, LON, SYD)
$urltype
string
$urltype The URL type ("publicURL" or "internalURL")

Returns

OpenCloud\Orchestration\Service

CodeCoverageIgnore

public OpenCloud\Volume\Service
# volumeService( string $name = null, string $region = null, string $urltype = null )

Creates a new Volume (Cinder) service object

Creates a new Volume (Cinder) service object

Parameters

$name
string
$name The name of the service as it appears in the Catalog
$region
string
$region The region (DFW, IAD, ORD, LON, SYD)
$urltype
string
$urltype The URL type ("publicURL" or "internalURL")

Returns

OpenCloud\Volume\Service
Methods inherited from OpenCloud\Common\Http\Client
getDefaultUserAgent(), getUserAgent()
Constants inherited from OpenCloud\Common\Http\Client
MINIMUM_PHP_VERSION, VERSION
PHP OpenCloud API API documentation generated by ApiGen 2.8.0