Merge branch 'master' into develop

This commit is contained in:
Matt Farina 2012-05-10 14:31:54 -04:00
commit 997bdf8c20
4 changed files with 11 additions and 8 deletions

View File

@ -16,5 +16,8 @@
}, },
"suggest": { "suggest": {
"curl": ">=7.0.0" "curl": ">=7.0.0"
},
"autoload": {
"psr-0": { "HPCloud": "src" }
} }
} }

View File

@ -143,7 +143,7 @@
* *
* // Get a listing of all of the services you currently have configured on * // Get a listing of all of the services you currently have configured on
* // HPCloud. * // HPCloud.
* $catalog = $itentity->serviceCatalog(); * $catalog = $identity->serviceCatalog();
* *
* var_dump($catalog); * var_dump($catalog);
* *
@ -159,7 +159,7 @@
* - HPCloud::Services::IdentityServices::__construct() tells the object where to connect. * - HPCloud::Services::IdentityServices::__construct() tells the object where to connect.
* - HPCloud::Services::IdentityServices::authenticateAsUser() lets you log * - HPCloud::Services::IdentityServices::authenticateAsUser() lets you log
* in with username and password. * in with username and password.
* - HPCloud::Services::IdentityServices::authenticateAsUser() lets you log * - HPCloud::Services::IdentityServices::authenticateAsAccount() lets you log
* in with account number and secret key. * in with account number and secret key.
* - HPCloud::Services::IdentityServices::serviceCatalog() tells you about * - HPCloud::Services::IdentityServices::serviceCatalog() tells you about
* the services you have activated on this account. * the services you have activated on this account.

View File

@ -65,7 +65,7 @@ look at [the PHP documentation](http://us3.php.net/manual/en/language.namespaces
or you may just prefer to keep on reading and learn by example. We don't or you may just prefer to keep on reading and learn by example. We don't
do anything really fancy with namespaces. do anything really fancy with namespaces.
**In this document, we sometimes replace the backslash (\) with double **In this document, we sometimes replace the backslash (\\) with double
colons (`::`) so that links are automatically generated.** So colons (`::`) so that links are automatically generated.** So
`\HPCloud\Bootstrap` may appear as HPCloud::Bootstrap. The reason for `\HPCloud\Bootstrap` may appear as HPCloud::Bootstrap. The reason for
this is [explained elsewhere](@ref styleguide). this is [explained elsewhere](@ref styleguide).
@ -164,7 +164,7 @@ network resources. And behind the scenes, account management would be
difficult on the server side. difficult on the server side.
That's where Identity Services comes in. It is a central service that That's where Identity Services comes in. It is a central service that
handles all things authorization and authentication related. Rouughly, handles all things authorization and authentication related. Roughly,
it works as follows: it works as follows:
- The client sends an authentication request - The client sends an authentication request
@ -227,7 +227,7 @@ dumping it with `var_dump()`, should you so desire.
At this point, we have what we need from Identity Services. It's time to At this point, we have what we need from Identity Services. It's time to
look at Object Storage. look at Object Storage.
### IdentityServices in a Nushell ### IdentityServices in a Nutshell
Instances of HPCloud::Services::IdentityServices are responsible for: Instances of HPCloud::Services::IdentityServices are responsible for:
@ -319,7 +319,7 @@ $container = $store->container('Example');
~~~ ~~~
Recall that `$store` is the name of our `ObjectStorage` instance. In the Recall that `$store` is the name of our `ObjectStorage` instance. In the
first of the two lines above, we create a new containe named `Example`. first of the two lines above, we create a new container named `Example`.
Then in the second line, we get that container. Then in the second line, we get that container.
Why is this two steps? The answer is that the HPCloud PHP library mimics Why is this two steps? The answer is that the HPCloud PHP library mimics
@ -372,7 +372,7 @@ with a local copy and a remote copy. If our code isn't constructed
correctly, it is possible for these two to get out of sync. correctly, it is possible for these two to get out of sync.
Earlier, we created a container directly on the remote side, and then Earlier, we created a container directly on the remote side, and then
featched the container. As we create an object, we are going to do the fetched the container. As we create an object, we are going to do the
opposite: We will create a local object, and then save it to the remote opposite: We will create a local object, and then save it to the remote
storage. Later, we will fetch the remote object. storage. Later, we will fetch the remote object.

View File

@ -152,7 +152,7 @@ The URL above has three important parts, in the form
`swift://CONTAINER/OBJECT_NAME`. `swift://CONTAINER/OBJECT_NAME`.
- *swift://*: This is the schema. This part of the URL tells PHP to pass - *swift://*: This is the schema. This part of the URL tells PHP to pass
the request to the HPCloud stream wrapper. (Siwft, by the way, is the the request to the HPCloud stream wrapper. (Swift, by the way, is the
[OpenStack name for object storage](http://openstack.org/projects/storage/). [OpenStack name for object storage](http://openstack.org/projects/storage/).
- *Example*: This is the *container name*. In Object Storage parlance, a - *Example*: This is the *container name*. In Object Storage parlance, a
container is a place to store documents. One account can have lots of container is a place to store documents. One account can have lots of