sammaye/yii2-rackspace

A Yii2 plugin for some Rackspace lovin'

Installs: 8

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii-extension

1.0 2016-03-29 12:51 UTC

This package is not auto-updated.

Last update: 2024-11-09 20:33:36 UTC


README

A Yii2 plugin for some Rackspace lovin' so simple even your dog will be able to use it.

Defining the Extension

Here is the full definition, from an example:

'rackspace' => [
	'class' => 'sammaye\rackspace\Rackspace',
	'identityEndpoint' => 'US_IDENTITY_ENDPOINT',
	'username' => 'SomeNotSoAwesomeUser',
	'apiKey' => 'AwesomeKeyInit'
],

Everything is quite self explanatory except for identityEndpoint. This is a string representation of the constant name.

At the time of writing there are currently two values for the identityEndpoint option:

  • US_IDENTITY_ENDPOINT
  • UK_IDENTITY_ENDPOINT

These directly relate to the SDK's own.

Now with this definition you can just use the API like the component doesn't even exist, for example:

$cdn = Yii::$app->rackspace->cdnService();
var_dump($cdn->listServices());

Links