Added support for @return in addition to @retval. @retval is a doxygen convention we use when generating our api docs. But, phpdoc uses @return which is what IDEs typically support on introspection. To better support introspection we now have both.

This commit is contained in:
Matt Farina
2012-08-09 14:36:19 -04:00
parent ee2f5019ca
commit 75730378e3
20 changed files with 144 additions and 16 deletions

View File

@@ -285,6 +285,7 @@ class Bootstrap {
* @param mixed $default * @param mixed $default
* The default value to return if the name is not found. * The default value to return if the name is not found.
* @retval mixed * @retval mixed
* @return mixed
* The value, if found; or the default, if set; or NULL. * The value, if found; or the default, if set; or NULL.
*/ */
public static function config($name = NULL, $default = NULL) { public static function config($name = NULL, $default = NULL) {
@@ -315,6 +316,7 @@ class Bootstrap {
* @param string $name * @param string $name
* The name of the item to check for. * The name of the item to check for.
* @retval boolean * @retval boolean
* @return boolean
* TRUE if the named option is set, FALSE otherwise. Note that the value may * TRUE if the named option is set, FALSE otherwise. Note that the value may
* be falsey (FALSE, 0, etc.), but if the value is NULL, this will return * be falsey (FALSE, 0, etc.), but if the value is NULL, this will return
* false. * false.
@@ -333,6 +335,7 @@ class Bootstrap {
* Whether to force the generation of a new object even if one is already * Whether to force the generation of a new object even if one is already
* cached. * cached.
* @retval HPCloud::Services::IdentityService * @retval HPCloud::Services::IdentityService
* @return \HPCloud\Services\:IdentityService
* An authenticated ready to use HPCloud::Services::IdentityService object. * An authenticated ready to use HPCloud::Services::IdentityService object.
* @throws HPCloud::Exception * @throws HPCloud::Exception
* When the needed configuration to authenticate is not available. * When the needed configuration to authenticate is not available.

View File

@@ -137,6 +137,7 @@ class DBaaS {
* Get the project ID for this session. * Get the project ID for this session.
* *
* @retval string * @retval string
* @return string
* The project ID. * The project ID.
*/ */
public function projectId() { public function projectId() {
@@ -147,6 +148,7 @@ class DBaaS {
* Get the endpoint URL to the DBaaS session. * Get the endpoint URL to the DBaaS session.
* *
* @retval string * @retval string
* @return string
* The URL. * The URL.
*/ */
public function url() { public function url() {

View File

@@ -79,7 +79,8 @@ class Instance extends Operations {
*- medium *- medium
* @param array $typeSpec * @param array $typeSpec
* A typespec array. Currently, only 'mysql', '5.5' is supported. * A typespec array. Currently, only 'mysql', '5.5' is supported.
* @retval object HPCloud::Services::DBaaS::InstanceDetails * @retval HPCloud::Services::DBaaS::InstanceDetails
* @return \HPCloud\Services\DBaaS\InstanceDetails
* The details of creation, including login and password info. * The details of creation, including login and password info.
* @see http://api-docs.hpcloud.com/hpcloud-dbaas/1.0/content/instance-create.html * @see http://api-docs.hpcloud.com/hpcloud-dbaas/1.0/content/instance-create.html
*/ */
@@ -132,6 +133,7 @@ class Instance extends Operations {
* Reset the primary password on this instance. * Reset the primary password on this instance.
* *
* @retval string * @retval string
* @return string
* The new (autogenerated) password. * The new (autogenerated) password.
*/ */
public function resetPassword($instanceId) { public function resetPassword($instanceId) {

View File

@@ -74,6 +74,7 @@ class InstanceDetails {
* Get the name of this instance. * Get the name of this instance.
* *
* @retval string * @retval string
* @return string
* The name of the instance. * The name of the instance.
*/ */
public function name() { public function name() {
@@ -84,6 +85,7 @@ class InstanceDetails {
* Get the ID of the instance. * Get the ID of the instance.
* *
* @retval string * @retval string
* @return string
* The ID. * The ID.
*/ */
public function id() { public function id() {
@@ -96,6 +98,7 @@ class InstanceDetails {
* This may only be set during CREATE or DESCRIBE results. * This may only be set during CREATE or DESCRIBE results.
* *
* @retval string * @retval string
* @return string
* A string indicating the creation time. * A string indicating the creation time.
* Format is in ISO date format. * Format is in ISO date format.
*/ */
@@ -115,6 +118,7 @@ class InstanceDetails {
*- restarting: Instance has been restarted, and is still coming online. *- restarting: Instance has been restarted, and is still coming online.
* *
* @retval string * @retval string
* @return string
* A short status message. * A short status message.
*/ */
public function status() { public function status() {
@@ -129,6 +133,7 @@ class InstanceDetails {
* checking that status() returns 'running'. * checking that status() returns 'running'.
* *
* @retval boolean * @retval boolean
* @return boolean
* TRUE if this is running, FALSE otherwise. * TRUE if this is running, FALSE otherwise.
*/ */
public function isRunning() { public function isRunning() {
@@ -148,6 +153,7 @@ class InstanceDetails {
* This returns the DNS name of the host (or possibly an IP address). * This returns the DNS name of the host (or possibly an IP address).
* *
* @retval string * @retval string
* @return string
* The FQDN or IP address of the MySQL server. * The FQDN or IP address of the MySQL server.
*/ */
public function hostname() { public function hostname() {
@@ -177,6 +183,7 @@ class InstanceDetails {
* Typically this is only available at creation time! * Typically this is only available at creation time!
* *
* @retval string * @retval string
* @return string
* The username for the MySQL instance. * The username for the MySQL instance.
*/ */
public function username() { public function username() {
@@ -208,6 +215,7 @@ class InstanceDetails {
* This is only returned when a database is first created. * This is only returned when a database is first created.
* *
* @retval string * @retval string
* @return string
* A password string. * A password string.
*/ */
public function password() { public function password() {
@@ -250,6 +258,7 @@ class InstanceDetails {
* definition. * definition.
* *
* @retval array * @retval array
* @return array
* An array of related links to DBaaS URLs. * An array of related links to DBaaS URLs.
*/ */
public function links() { public function links() {
@@ -271,6 +280,7 @@ class InstanceDetails {
* of PHP use this. * of PHP use this.
* *
* @retval string * @retval string
* @return string
* The DSN, including driver, host, port, and database name. * The DSN, including driver, host, port, and database name.
* @todo * @todo
* At this time, 'mysql' is hard-coded as the driver name. Does this * At this time, 'mysql' is hard-coded as the driver name. Does this

View File

@@ -66,6 +66,7 @@ class Snapshot extends Operations {
* An optional database instance ID. If set, only snapshots for * An optional database instance ID. If set, only snapshots for
* the given instance will be returned. * the given instance will be returned.
* @retval array * @retval array
* @return array
* An array of HPCloud::Services::DBaaS::SnapshotDetails * An array of HPCloud::Services::DBaaS::SnapshotDetails
* instances. * instances.
*/ */
@@ -102,7 +103,8 @@ class Snapshot extends Operations {
* A human-readable name for the snapshot. Internally, * A human-readable name for the snapshot. Internally,
* a snapshot ID will be used to reference this * a snapshot ID will be used to reference this
* snapshot. * snapshot.
* @retval object HPCloud::Services::DBaaS::SnapshotDetails * @retval HPCloud::Services::DBaaS::SnapshotDetails
* @return \HPCloud\Services\DBaaS\SnapshotDetails
* A snapshot details object containing information about * A snapshot details object containing information about
* the snapshot. * the snapshot.
*/ */
@@ -130,6 +132,7 @@ class Snapshot extends Operations {
* The snapshot ID for the snapshot that should * The snapshot ID for the snapshot that should
* be deleted. * be deleted.
* @retval boolean * @retval boolean
* @return boolean
* Returns boolean TRUE on success. Throws one of the * Returns boolean TRUE on success. Throws one of the
* HPCloud::Exception instances on failure. * HPCloud::Exception instances on failure.
* @throws HPCloud::Exception * @throws HPCloud::Exception
@@ -148,7 +151,8 @@ class Snapshot extends Operations {
* @param string $snapshotId * @param string $snapshotId
* The snapshot ID. * The snapshot ID.
* *
* @retval object HPCloud::Services::DBaaS::SnapshotDetails * @retval HPCloud::Services::DBaaS::SnapshotDetails
* @return \HPCloud\Services\DBaaS\SnapshotDetails
* The details object. * The details object.
*/ */
public function describe($snapshotId) { public function describe($snapshotId) {

View File

@@ -54,6 +54,7 @@ class SnapshotDetails {
* The ID of the snapshot. * The ID of the snapshot.
* *
* @retval string * @retval string
* @return string
* The ID. * The ID.
*/ */
public function id() { public function id() {
@@ -66,6 +67,7 @@ class SnapshotDetails {
* is a snapshot. * is a snapshot.
* *
* @retval string * @retval string
* @return string
* The database instance ID. * The database instance ID.
*/ */
public function instanceId() { public function instanceId() {
@@ -75,6 +77,7 @@ class SnapshotDetails {
* The data upon which this snapshot was created. * The data upon which this snapshot was created.
* *
* @retval string * @retval string
* @return string
* An ISO data string representing the date and time * An ISO data string representing the date and time
* that this snapshot was created. * that this snapshot was created.
*/ */
@@ -90,6 +93,7 @@ class SnapshotDetails {
* The data returned from this may be in flux during the beta release * The data returned from this may be in flux during the beta release
* of this product. * of this product.
* @retval array * @retval array
* @return array
* An array of links. Typically, at least an URL to the snapshot should * An array of links. Typically, at least an URL to the snapshot should
* be provided. * be provided.
*/ */

View File

@@ -223,6 +223,7 @@ class IdentityServices /*implements Serializable*/ {
* URL to the one passed into the constructor. * URL to the one passed into the constructor.
* *
* @retval string * @retval string
* @return string
* The complete URL to the identity services endpoint. * The complete URL to the identity services endpoint.
*/ */
public function url() { public function url() {
@@ -258,6 +259,7 @@ class IdentityServices /*implements Serializable*/ {
* An associative array of authentication operations and their respective * An associative array of authentication operations and their respective
* parameters. * parameters.
* @retval string * @retval string
* @return string
* The token. This is returned for simplicity. The full response is used * The token. This is returned for simplicity. The full response is used
* to populate this object's service catalog, etc. The token is also * to populate this object's service catalog, etc. The token is also
* retrievable with token(). * retrievable with token().
@@ -383,6 +385,7 @@ class IdentityServices /*implements Serializable*/ {
* The tenant Name for this account. This can be obtained through the * The tenant Name for this account. This can be obtained through the
* HPCloud console. * HPCloud console.
* @retval string * @retval string
* @return string
* The auth token. * The auth token.
* @throws HPCloud::Transport::AuthorizationException * @throws HPCloud::Transport::AuthorizationException
* If authentication failed. * If authentication failed.
@@ -416,6 +419,7 @@ class IdentityServices /*implements Serializable*/ {
* methods has been run. * methods has been run.
* *
* @retval string * @retval string
* @return string
* The token ID to be used in subsequent calls. * The token ID to be used in subsequent calls.
*/ */
public function token() { public function token() {
@@ -432,6 +436,7 @@ class IdentityServices /*implements Serializable*/ {
* run. * run.
* *
* @retval string * @retval string
* @return string
* The tenant ID if available, or NULL. * The tenant ID if available, or NULL.
*/ */
public function tenantId() { public function tenantId() {
@@ -450,6 +455,7 @@ class IdentityServices /*implements Serializable*/ {
* run. * run.
* *
* @retval string * @retval string
* @return string
* The tenant name if available, or NULL. * The tenant name if available, or NULL.
*/ */
public function tenantName() { public function tenantName() {
@@ -484,6 +490,7 @@ class IdentityServices /*implements Serializable*/ {
* This will not be populated until after authentication has been done. * This will not be populated until after authentication has been done.
* *
* @retval array * @retval array
* @return array
* An associative array of details. * An associative array of details.
*/ */
public function tokenDetails() { public function tokenDetails() {
@@ -498,6 +505,7 @@ class IdentityServices /*implements Serializable*/ {
* mis-configured machine timestamp could give spurious results. * mis-configured machine timestamp could give spurious results.
* *
* @retval boolean * @retval boolean
* @return boolean
* This will return FALSE if there is a current token and it has * This will return FALSE if there is a current token and it has
* not yet expired (according to the date info). In all other cases * not yet expired (according to the date info). In all other cases
* it returns TRUE. * it returns TRUE.
@@ -581,6 +589,7 @@ class IdentityServices /*implements Serializable*/ {
* @todo Paging on the service catalog is not yet implemented. * @todo Paging on the service catalog is not yet implemented.
* *
* @retval array * @retval array
* @return array
* An associative array representing * An associative array representing
* the service catalog. * the service catalog.
*/ */
@@ -628,6 +637,7 @@ class IdentityServices /*implements Serializable*/ {
* This will not have data until after authentication has been done. * This will not have data until after authentication has been done.
* *
* @retval array * @retval array
* @return array
* An associative array, as described above. * An associative array, as described above.
*/ */
public function user() { public function user() {
@@ -661,6 +671,7 @@ class IdentityServices /*implements Serializable*/ {
* Note that this method invokes a new request against the remote server. * Note that this method invokes a new request against the remote server.
* *
* @retval array * @retval array
* @return array
* An indexed array of tenant info. Each entry will be an associative * An indexed array of tenant info. Each entry will be an associative
* array containing tenant details. * array containing tenant details.
* @throws HPCloud::Transport::AuthorizationException * @throws HPCloud::Transport::AuthorizationException
@@ -723,6 +734,7 @@ class IdentityServices /*implements Serializable*/ {
* ID will be removed. * ID will be removed.
* *
* @retval string * @retval string
* @return string
* The authentication token. * The authentication token.
* @throws HPCloud::Transport::AuthorizationException * @throws HPCloud::Transport::AuthorizationException
* If authentication failed. * If authentication failed.
@@ -780,6 +792,7 @@ class IdentityServices /*implements Serializable*/ {
* name will be removed. * name will be removed.
* *
* @retval string * @retval string
* @return string
* The authentication token. * The authentication token.
* @throws HPCloud::Transport::AuthorizationException * @throws HPCloud::Transport::AuthorizationException
* If authentication failed. * If authentication failed.

View File

@@ -149,7 +149,9 @@ class CDN {
* *
* @param HPCloud::Services::IdentityServices $identity * @param HPCloud::Services::IdentityServices $identity
* The identity to use. * The identity to use.
* @retval object * @retval boolean
* @retval HPCloud::Storage::CDN
* @return \HPCloud\Storage\CDN|boolean
* A CDN object or FALSE if no CDN services could be found * A CDN object or FALSE if no CDN services could be found
* in the catalog. * in the catalog.
*/ */
@@ -195,7 +197,9 @@ class CDN {
* A service catalog; see HPCloud::Services::IdentityServices::serviceCatalog(). * A service catalog; see HPCloud::Services::IdentityServices::serviceCatalog().
* @param string $token * @param string $token
* The token. * The token.
* @retval object * @retval boolean
* @retval HPCloud::Storage::CDN
* @return boolean|\HPCloud\Storage\CDN
* A CDN object or FALSE if no CDN services could be found * A CDN object or FALSE if no CDN services could be found
* in the catalog. * in the catalog.
*/ */
@@ -305,6 +309,7 @@ class CDN {
* If this is set to TRUE, then only containers that are * If this is set to TRUE, then only containers that are
* CDN-enabled will be returned. * CDN-enabled will be returned.
* @retval array * @retval array
* @return array
* An indexed array of associative arrays. The format of each * An indexed array of associative arrays. The format of each
* associative array is explained on container(). * associative array is explained on container().
* @throws HPCloud::Exception * @throws HPCloud::Exception
@@ -357,6 +362,7 @@ class CDN {
* @param string $name * @param string $name
* The name of the container to fetch. * The name of the container to fetch.
* @retval array * @retval array
* @return array
* An associative array in the exact format as in containers. * An associative array in the exact format as in containers.
*/ */
public function container($name) { public function container($name) {
@@ -412,6 +418,7 @@ class CDN {
* If this is passed, then its value will be set to TRUE if the * If this is passed, then its value will be set to TRUE if the
* container was created in the CDN, or FALSE if the container * container was created in the CDN, or FALSE if the container
* already existed in CDN. * already existed in CDN.
* @retval string
* @return string * @return string
* TRUE if the container was created, FALSE if the container was already * TRUE if the container was created, FALSE if the container was already
* added to the CDN (and thus nothing happened). * added to the CDN (and thus nothing happened).
@@ -450,6 +457,7 @@ class CDN {
* @param array $attrs * @param array $attrs
* An associative array of attributes. * An associative array of attributes.
* @retval boolean * @retval boolean
* @return boolean
* TRUE if the update was successful. * TRUE if the update was successful.
* @throws HPCloud::Exception * @throws HPCloud::Exception
* Possibly throws one of the HTTP exceptions. * Possibly throws one of the HTTP exceptions.
@@ -509,6 +517,7 @@ class CDN {
* @param string $name * @param string $name
* The name of the container whose cache should be suspended. * The name of the container whose cache should be suspended.
* @retval boolean * @retval boolean
* @return boolean
* TRUE if the container is disabled. * TRUE if the container is disabled.
* @throws HPCloud::Exception * @throws HPCloud::Exception
* HTTP exceptions may be thrown if an error occurs. * HTTP exceptions may be thrown if an error occurs.
@@ -535,6 +544,7 @@ class CDN {
* @param string $name * @param string $name
* The Container name. * The Container name.
* @retval boolean * @retval boolean
* @return boolean
* TRUE if the container was successfully deleted, * TRUE if the container was successfully deleted,
* FALSE if the container was not removed, but no * FALSE if the container was not removed, but no
* error occurred. * error occurred.

View File

@@ -172,7 +172,8 @@ class ObjectStorage {
* @param HPCloud::Services::IdentityServices $identity * @param HPCloud::Services::IdentityServices $identity
* An identity services object that already has a valid token and a * An identity services object that already has a valid token and a
* service catalog. * service catalog.
* @retval object ObjectStorage * @retval HPCloud::Storage::ObjectStorage
* @return \HPCloud\Storage\ObjectStorage
* A new ObjectStorage instance. * A new ObjectStorage instance.
*/ */
public static function newFromIdentity($identity) { public static function newFromIdentity($identity) {
@@ -196,7 +197,8 @@ class ObjectStorage {
* just ObjectStorage::SERVICE_TYPE. * just ObjectStorage::SERVICE_TYPE.
* @param string $authToken * @param string $authToken
* The auth token returned by IdentityServices. * The auth token returned by IdentityServices.
* @retval object ObjectStorage * @retval HPCloud::Storage::ObjectStorage
* @return \HPCloud\Storage\ObjectStorage
* A new ObjectStorage instance. * A new ObjectStorage instance.
*/ */
public static function newFromServiceCatalog($catalog, $authToken) { public static function newFromServiceCatalog($catalog, $authToken) {
@@ -286,6 +288,7 @@ class ObjectStorage {
* If this is TRUE (default), get the URL to the SSL CDN; * If this is TRUE (default), get the URL to the SSL CDN;
* otherwise get the URL to the plain HTTP CDN. * otherwise get the URL to the plain HTTP CDN.
* @retval string * @retval string
* @return string
* The URL to the CDN container, or NULL if no such * The URL to the CDN container, or NULL if no such
* URL is found. * URL is found.
*/ */
@@ -300,6 +303,7 @@ class ObjectStorage {
* Get the authentication token. * Get the authentication token.
* *
* @retval string * @retval string
* @return string
* The authentication token. * The authentication token.
*/ */
public function token() { public function token() {
@@ -310,6 +314,7 @@ class ObjectStorage {
* Get the URL endpoint. * Get the URL endpoint.
* *
* @retval string * @retval string
* @return string
* The URL that is the endpoint for this service. * The URL that is the endpoint for this service.
*/ */
public function url() { public function url() {
@@ -346,6 +351,7 @@ class ObjectStorage {
* The name of the last object seen. Used when paging. * The name of the last object seen. Used when paging.
* *
* @retval array * @retval array
* @return array
* An associative array of containers, where the key is the * An associative array of containers, where the key is the
* container's name and the value is an * container's name and the value is an
* HPCloud::Storage::ObjectStorage::Container object. Results are * HPCloud::Storage::ObjectStorage::Container object. Results are
@@ -387,6 +393,7 @@ class ObjectStorage {
* @param string $name * @param string $name
* The name of the container to load. * The name of the container to load.
* @retval HPCloud::Storage::ObjectStorage::Container * @retval HPCloud::Storage::ObjectStorage::Container
* @return \HPCloud\Storage\ObjectStorage\Container
* A container. * A container.
* @throws HPCloud::Transport::FileNotFoundException * @throws HPCloud::Transport::FileNotFoundException
* if the named container is not found on the remote server. * if the named container is not found on the remote server.
@@ -422,6 +429,7 @@ class ObjectStorage {
* @param string $name * @param string $name
* The name of the container to test. * The name of the container to test.
* @retval boolean * @retval boolean
* @return boolean
* TRUE if the container exists, FALSE if it does not. * TRUE if the container exists, FALSE if it does not.
* @throws HPCloud::Exception * @throws HPCloud::Exception
* If an unexpected network error occurs. * If an unexpected network error occurs.
@@ -495,6 +503,7 @@ class ObjectStorage {
* @param array $metadata * @param array $metadata
* An associative array of metadata to attach to the container. * An associative array of metadata to attach to the container.
* @retval boolean * @retval boolean
* @return boolean
* TRUE if the container was created, FALSE if the container was not * TRUE if the container was created, FALSE if the container was not
* created because it already exists. * created because it already exists.
*/ */
@@ -558,6 +567,7 @@ class ObjectStorage {
* An ACL. To make the container publically readable, use * An ACL. To make the container publically readable, use
* ACL::makePublic(). * ACL::makePublic().
* @retval boolean * @retval boolean
* @return boolean
* TRUE if the cointainer was created, FALSE otherwise. * TRUE if the cointainer was created, FALSE otherwise.
*/ */
public function changeContainerACL($name, ACL $acl) { public function changeContainerACL($name, ACL $acl) {
@@ -579,6 +589,7 @@ class ObjectStorage {
* @param string $name * @param string $name
* The name of the container. * The name of the container.
* @retval boolean * @retval boolean
* @return boolean
* TRUE if the container was deleted, FALSE if the container was not * TRUE if the container was deleted, FALSE if the container was not
* found (and hence, was not deleted). * found (and hence, was not deleted).
* @throws HPCloud::Storage::ObjectStorage::ContainerNotEmptyException * @throws HPCloud::Storage::ObjectStorage::ContainerNotEmptyException
@@ -625,6 +636,7 @@ class ObjectStorage {
* - The number of containers (`count`). * - The number of containers (`count`).
* *
* @retval array * @retval array
* @return array
* An associative array of account info. Typical keys are: * An associative array of account info. Typical keys are:
* - bytes: Bytes consumed by existing content. * - bytes: Bytes consumed by existing content.
* - containers: Number of containers. * - containers: Number of containers.

View File

@@ -152,6 +152,7 @@ class ACL {
* - READ to any host, with container listings. * - READ to any host, with container listings.
* *
* @retval HPCloud::Storage::ObjectStorage::ACL * @retval HPCloud::Storage::ObjectStorage::ACL
* @return \HPCloud\Storage\ObjectStorage\ACL
* an ACL object with the appopriate permissions set. * an ACL object with the appopriate permissions set.
*/ */
public static function makePublic() { public static function makePublic() {
@@ -172,6 +173,7 @@ class ACL {
* with no permissions as a private object. * with no permissions as a private object.
* *
* @retval HPCloud::Storage::ObjectStorage::ACL * @retval HPCloud::Storage::ObjectStorage::ACL
* @return \HPCloud\Storage\ObjectStorage\ACL
* an ACL object with the appopriate permissions set. * an ACL object with the appopriate permissions set.
*/ */
public static function makeNonPublic() { public static function makeNonPublic() {
@@ -194,7 +196,8 @@ class ACL {
* *
* @param array $headers * @param array $headers
* An associative array of headers. * An associative array of headers.
* @retval ACL * @retval HPCloud::Storage::ObjectStorage::ACL
* @return \HPCloud\Storage\ObjectStorage\ACL
* A new ACL. * A new ACL.
*/ */
public static function newFromHeaders($headers) { public static function newFromHeaders($headers) {
@@ -242,6 +245,7 @@ class ACL {
* @param string $rule * @param string $rule
* The string rule to parse. * The string rule to parse.
* @retval array * @retval array
* @return array
* The rule as an array. * The rule as an array.
*/ */
public static function parseRule($perm, $rule) { public static function parseRule($perm, $rule) {
@@ -392,6 +396,7 @@ class ACL {
* Get the rules array for this ACL. * Get the rules array for this ACL.
* *
* @retval array * @retval array
* @return array
* An array of associative arrays of rules. * An array of associative arrays of rules.
*/ */
public function rules() { public function rules() {
@@ -496,6 +501,7 @@ class ACL {
* at all. * at all.
* *
* @retval boolean * @retval boolean
* @return boolean
* TRUE if this is private (non-public), FALSE if * TRUE if this is private (non-public), FALSE if
* any permissions are granted via this ACL. * any permissions are granted via this ACL.
*/ */
@@ -544,6 +550,7 @@ class ACL {
* a pretty string. * a pretty string.
* *
* @retval string * @retval string
* @return string
* The ACL represented as a string. * The ACL represented as a string.
*/ */
public function __toString() { public function __toString() {

View File

@@ -110,6 +110,7 @@ class Container implements \Countable, \IteratorAggregate {
* @param string $prefix * @param string $prefix
* A prefix for the metadata headers. * A prefix for the metadata headers.
* @retval array * @retval array
* @return array
* An array of headers. * An array of headers.
* @see http://docs.openstack.org/bexar/openstack-object-storage/developer/content/ch03s03.html#d5e635 * @see http://docs.openstack.org/bexar/openstack-object-storage/developer/content/ch03s03.html#d5e635
* @see http://docs.openstack.org/bexar/openstack-object-storage/developer/content/ch03s03.html#d5e700 * @see http://docs.openstack.org/bexar/openstack-object-storage/developer/content/ch03s03.html#d5e700
@@ -143,6 +144,7 @@ class Container implements \Countable, \IteratorAggregate {
* @param string $oname * @param string $oname
* The name of the object. * The name of the object.
* @retval string * @retval string
* @return string
* The URL to the object. Characters that need escaping will be escaped, * The URL to the object. Characters that need escaping will be escaped,
* while slash characters are not. Thus, the URL will look pathy. * while slash characters are not. Thus, the URL will look pathy.
*/ */
@@ -179,6 +181,7 @@ class Container implements \Countable, \IteratorAggregate {
* @param string $prefix * @param string $prefix
* The prefix on metadata headers. * The prefix on metadata headers.
* @retval array * @retval array
* @return array
* An associative array of name/value attribute pairs. * An associative array of name/value attribute pairs.
*/ */
public static function extractHeaderAttributes($headers, $prefix = NULL) { public static function extractHeaderAttributes($headers, $prefix = NULL) {
@@ -252,7 +255,8 @@ class Container implements \Countable, \IteratorAggregate {
* @param string $url * @param string $url
* The base URL. The container name is automatically appended to * The base URL. The container name is automatically appended to
* this at construction time. * this at construction time.
* @retval Container * @retval HPCloud::Storage::ObjectStorage::Container
* @return \HPCloud\Storage\ObjectStorage\Container
* The Container object, initialized and ready for use. * The Container object, initialized and ready for use.
*/ */
public static function newFromResponse($name, $response, $token, $url) { public static function newFromResponse($name, $response, $token, $url) {
@@ -348,6 +352,7 @@ class Container implements \Countable, \IteratorAggregate {
* Get the name of this container. * Get the name of this container.
* *
* @retval string * @retval string
* @return string
* The name of the container. * The name of the container.
*/ */
public function name() { public function name() {
@@ -358,6 +363,7 @@ class Container implements \Countable, \IteratorAggregate {
* Get the number of bytes in this container. * Get the number of bytes in this container.
* *
* @retval int * @retval int
* @return int
* The number of bytes in this container. * The number of bytes in this container.
*/ */
public function bytes() { public function bytes() {
@@ -383,6 +389,7 @@ class Container implements \Countable, \IteratorAggregate {
* directly does. * directly does.
* *
* @retval array * @retval array
* @return array
* An array of metadata name/value pairs. * An array of metadata name/value pairs.
*/ */
public function metadata() { public function metadata() {
@@ -436,6 +443,7 @@ class Container implements \Countable, \IteratorAggregate {
* @endcode * @endcode
* *
* @retval int * @retval int
* @return int
* The number of items in this container. * The number of items in this container.
*/ */
public function count() { public function count() {
@@ -458,6 +466,7 @@ class Container implements \Countable, \IteratorAggregate {
* An optional file argument that, if set, will be treated as the * An optional file argument that, if set, will be treated as the
* contents of the object. * contents of the object.
* @retval boolean * @retval boolean
* @return boolean
* TRUE if the object was saved. * TRUE if the object was saved.
* @throws HPCloud::Transport::LengthRequiredException * @throws HPCloud::Transport::LengthRequiredException
* if the Content-Length could not be determined and chunked * if the Content-Length could not be determined and chunked
@@ -577,6 +586,7 @@ class Container implements \Countable, \IteratorAggregate {
* The object to update. * The object to update.
* *
* @retval boolean * @retval boolean
* @return boolean
* TRUE if the metadata was updated. * TRUE if the metadata was updated.
* *
* @throws HPCloud::Transport::FileNotFoundException * @throws HPCloud::Transport::FileNotFoundException
@@ -695,7 +705,8 @@ class Container implements \Countable, \IteratorAggregate {
* If this is TRUE (the default), then SSL will always be * If this is TRUE (the default), then SSL will always be
* used. If this is FALSE, then CDN-based fetching will * used. If this is FALSE, then CDN-based fetching will
* use non-SSL, which is faster. * use non-SSL, which is faster.
* @retval \HPCloud\Storage\ObjectStorage\RemoteObject * @retval HPCloud::Storage::ObjectStorage::RemoteObject
* @return \HPCloud\Storage\ObjectStorage\RemoteObject
* A remote object with the content already stored locally. * A remote object with the content already stored locally.
*/ */
public function object($name, $requireSSL = TRUE) { public function object($name, $requireSSL = TRUE) {
@@ -759,7 +770,8 @@ class Container implements \Countable, \IteratorAggregate {
* *
* @param string $name * @param string $name
* The name of the object to fetch. * The name of the object to fetch.
* @retval \HPCloud\Storage\ObjectStorage\RemoteObject * @retval HPCloud::Storage::ObjectStorage::RemoteObject
* @return \HPCloud\Storage\ObjectStorage\RemoteObject
* A remote object ready for use. * A remote object ready for use.
*/ */
public function proxyObject($name) { public function proxyObject($name) {
@@ -830,6 +842,7 @@ class Container implements \Countable, \IteratorAggregate {
* The name of the object to start with. The query will begin with * The name of the object to start with. The query will begin with
* the next object AFTER this one. * the next object AFTER this one.
* @retval array * @retval array
* @return array
* List of RemoteObject or Subdir instances. * List of RemoteObject or Subdir instances.
*/ */
public function objects($limit = NULL, $marker = NULL) { public function objects($limit = NULL, $marker = NULL) {
@@ -891,6 +904,7 @@ class Container implements \Countable, \IteratorAggregate {
* The name of the object to start with. The query will begin with * The name of the object to start with. The query will begin with
* the next object AFTER this one. * the next object AFTER this one.
* @retval array * @retval array
* @return array
* List of RemoteObject or Subdir instances. * List of RemoteObject or Subdir instances.
*/ */
public function objectsWithPrefix($prefix, $delimiter = '/', $limit = NULL, $marker = NULL) { public function objectsWithPrefix($prefix, $delimiter = '/', $limit = NULL, $marker = NULL) {
@@ -956,6 +970,7 @@ class Container implements \Countable, \IteratorAggregate {
* ObjectStorage::createContainer()) will be accessible by this URL. * ObjectStorage::createContainer()) will be accessible by this URL.
* *
* @retval string * @retval string
* @return string
* The URL. * The URL.
*/ */
public function url() { public function url() {
@@ -981,6 +996,7 @@ class Container implements \Countable, \IteratorAggregate {
* *
* @todo Determine how to get the ACL from JSON data. * @todo Determine how to get the ACL from JSON data.
* @retval \HPCloud\Storage\ObjectStorage\ACL * @retval \HPCloud\Storage\ObjectStorage\ACL
* @return HPCloud::Storage::ObjectStorage::ACL
* An ACL, or NULL if the ACL could not be retrieved. * An ACL, or NULL if the ACL could not be retrieved.
*/ */
public function acl() { public function acl() {
@@ -1117,6 +1133,7 @@ class Container implements \Countable, \IteratorAggregate {
* @param string $name * @param string $name
* The name of the object to remove. * The name of the object to remove.
* @retval boolean * @retval boolean
* @return boolean
* TRUE if the file was deleted, FALSE if no such file is found. * TRUE if the file was deleted, FALSE if no such file is found.
*/ */
public function delete($name) { public function delete($name) {

View File

@@ -164,6 +164,7 @@ class Object {
* This returns an associative array of all metadata for this object. * This returns an associative array of all metadata for this object.
* *
* @retval array * @retval array
* @return array
* An associative array of metadata. This may be empty. * An associative array of metadata. This may be empty.
*/ */
public function metadata() { public function metadata() {
@@ -200,6 +201,7 @@ class Object {
* using setName(), this will return the latest (overwritten) name. * using setName(), this will return the latest (overwritten) name.
* *
* @retval string * @retval string
* @return string
* The name of the object. * The name of the object.
*/ */
public function name() { public function name() {
@@ -248,6 +250,7 @@ class Object {
* This returns the currently set content type. * This returns the currently set content type.
* *
* @retval string * @retval string
* @return string
* The content type, including any additional options. * The content type, including any additional options.
*/ */
public function contentType() { public function contentType() {
@@ -306,6 +309,7 @@ class Object {
* returns the entire contents of an object. * returns the entire contents of an object.
* *
* @retval string * @retval string
* @return string
* The content of the file. * The content of the file.
*/ */
public function content() { public function content() {
@@ -323,7 +327,8 @@ class Object {
* When extending this class, you should make sure to calculate the * When extending this class, you should make sure to calculate the
* content length appropriately. * content length appropriately.
* *
* return int * @retval int
* @return int
* The length of the content, in bytes. * The length of the content, in bytes.
*/ */
public function contentLength() { public function contentLength() {
@@ -341,6 +346,7 @@ class Object {
* the entire object's content (but not the metadata or name). * the entire object's content (but not the metadata or name).
* *
* @retval string * @retval string
* @return string
* An MD5 value as a string of 32 hex digits (0-9a-f). * An MD5 value as a string of 32 hex digits (0-9a-f).
*/ */
public function eTag() { public function eTag() {
@@ -383,6 +389,7 @@ class Object {
* See setEncoding() for more information. * See setEncoding() for more information.
* *
* @retval string * @retval string
* @return string
* The encoding type. * The encoding type.
*/ */
public function encoding() { public function encoding() {
@@ -426,6 +433,7 @@ class Object {
* See setDisposition() for discussion. * See setDisposition() for discussion.
* *
* @retval string * @retval string
* @return string
* The disposition string, or NULL if none is set. * The disposition string, or NULL if none is set.
*/ */
public function disposition() { public function disposition() {
@@ -524,6 +532,7 @@ class Object {
* if this returns TRUE, contentLength() is ignored. * if this returns TRUE, contentLength() is ignored.
* *
* @retval boolean * @retval boolean
* @return boolean
* TRUE to recommend chunked transfer, FALSE otherwise. * TRUE to recommend chunked transfer, FALSE otherwise.
*/ */
public function isChunked() { public function isChunked() {

View File

@@ -210,6 +210,7 @@ class RemoteObject extends Object {
* (b) it mirrors non-CDN behavior. This can be turned off by setting * (b) it mirrors non-CDN behavior. This can be turned off by setting
* $useSSL to FALSE. * $useSSL to FALSE.
* @retval string * @retval string
* @return string
* A URL to the object. The following considerations apply: * A URL to the object. The following considerations apply:
* - If the container is public, this URL can be loaded without * - If the container is public, this URL can be loaded without
* authentication. You can, for example, pass the URL to a browser * authentication. You can, for example, pass the URL to a browser
@@ -281,6 +282,7 @@ class RemoteObject extends Object {
* were sent from the server. * were sent from the server.
* *
* @retval array * @retval array
* @return array
* An associative array of header names and values. * An associative array of header names and values.
*/ */
public function headers() { public function headers() {
@@ -363,6 +365,7 @@ class RemoteObject extends Object {
* Be wary of using this method with large files. * Be wary of using this method with large files.
* *
* @retval string * @retval string
* @return string
* The contents of the file as a string. * The contents of the file as a string.
* @throws \HPCloud\Transport\FileNotFoundException * @throws \HPCloud\Transport\FileNotFoundException
* when the requested content cannot be located on the remote * when the requested content cannot be located on the remote
@@ -429,6 +432,7 @@ class RemoteObject extends Object {
* and the content will be refreshed from the server. Any * and the content will be refreshed from the server. Any
* local changes to the object will be discarded. * local changes to the object will be discarded.
* @retval resource * @retval resource
* @return resource
* A handle to the stream, which is already opened and positioned at * A handle to the stream, which is already opened and positioned at
* the beginning of the stream. * the beginning of the stream.
*/ */
@@ -497,6 +501,7 @@ class RemoteObject extends Object {
* its contents, not whether anything is actually cached. * its contents, not whether anything is actually cached.
* *
* @retval boolean * @retval boolean
* @return boolean
* TRUE if caching is enabled, FALSE otherwise. * TRUE if caching is enabled, FALSE otherwise.
*/ */
public function isCaching() { public function isCaching() {
@@ -544,6 +549,7 @@ class RemoteObject extends Object {
* supplied ETag hash. * supplied ETag hash.
* *
* @retval boolean * @retval boolean
* @return boolean
* TRUE if this is verifying, FALSE otherwise. * TRUE if this is verifying, FALSE otherwise.
*/ */
public function isVerifyingContent() { public function isVerifyingContent() {
@@ -622,7 +628,8 @@ class RemoteObject extends Object {
* cause the remote host to return the object in the response body. * cause the remote host to return the object in the response body.
* The response body is not handled, though. If this is set to * The response body is not handled, though. If this is set to
* FALSE, a HEAD request is sent, and no body is returned. * FALSE, a HEAD request is sent, and no body is returned.
* @retval \HPCloud\Transport\Response * @retval HPCloud::Transport::Response
* @return \HPCloud\Transport\Response
* containing the object metadata and (depending on the * containing the object metadata and (depending on the
* $fetchContent flag) optionally the data. * $fetchContent flag) optionally the data.
*/ */

View File

@@ -407,6 +407,7 @@ class StreamWrapper {
* @param int $options * @param int $options
* Unused. * Unused.
* @retval boolean * @retval boolean
* @return boolean
* TRUE if the directory is opened, FALSE otherwise. * TRUE if the directory is opened, FALSE otherwise.
*/ */
public function dir_opendir($path, $options) { public function dir_opendir($path, $options) {
@@ -462,6 +463,7 @@ class StreamWrapper {
* @endcode * @endcode
* *
* @retval string * @retval string
* @return string
* The name of the resource or FALSE when the directory has no more * The name of the resource or FALSE when the directory has no more
* entries. * entries.
*/ */
@@ -562,6 +564,7 @@ class StreamWrapper {
* @param string $path_to * @param string $path_to
* A swift URL to another path. * A swift URL to another path.
* @retval boolean * @retval boolean
* @return boolean
* TRUE on success, FALSE otherwise. * TRUE on success, FALSE otherwise.
*/ */
public function rename($path_from, $path_to) { public function rename($path_from, $path_to) {
@@ -609,6 +612,7 @@ class StreamWrapper {
* side effects. * side effects.
* *
* @retval resource * @retval resource
* @return resource
* this returns the underlying stream. * this returns the underlying stream.
*/ */
public function stream_cast($cast_as) { public function stream_cast($cast_as) {
@@ -662,6 +666,7 @@ class StreamWrapper {
* See stream_seek(). * See stream_seek().
* *
* @retval boolean * @retval boolean
* @return boolean
* TRUE if it has reached the end, FALSE otherwise. * TRUE if it has reached the end, FALSE otherwise.
*/ */
public function stream_eof() { public function stream_eof() {
@@ -969,6 +974,7 @@ class StreamWrapper {
* @param int $count * @param int $count
* The number of bytes to read (usually 8192). * The number of bytes to read (usually 8192).
* @retval string * @retval string
* @return string
* The data read. * The data read.
*/ */
public function stream_read($count) { public function stream_read($count) {
@@ -1034,6 +1040,7 @@ class StreamWrapper {
* etc.) through HPCloud::Bootstrap::setConfiguration(). * etc.) through HPCloud::Bootstrap::setConfiguration().
* *
* @retval array * @retval array
* @return array
* The stats array. * The stats array.
*/ */
public function stream_stat() { public function stream_stat() {
@@ -1052,6 +1059,7 @@ class StreamWrapper {
* See ftell() and fseek(). * See ftell() and fseek().
* *
* @retval int * @retval int
* @return int
* The current position in the stream. * The current position in the stream.
*/ */
public function stream_tell() { public function stream_tell() {
@@ -1068,6 +1076,7 @@ class StreamWrapper {
* @param string $data * @param string $data
* Data to write to the stream. * Data to write to the stream.
* @retval int * @retval int
* @return int
* The number of bytes written. 0 indicates and error. * The number of bytes written. 0 indicates and error.
*/ */
public function stream_write($data) { public function stream_write($data) {
@@ -1094,6 +1103,7 @@ class StreamWrapper {
* @param string $path * @param string $path
* The URL. * The URL.
* @retval boolean * @retval boolean
* @return boolean
* TRUE if the file was deleted, FALSE otherwise. * TRUE if the file was deleted, FALSE otherwise.
*/ */
public function unlink($path) { public function unlink($path) {
@@ -1409,6 +1419,7 @@ class StreamWrapper {
* @param mixed $default * @param mixed $default
* The default value to return if no config param was found. * The default value to return if no config param was found.
* @retval mixed * @retval mixed
* @return mixed
* The discovered result, or $default if specified, or NULL if * The discovered result, or $default if specified, or NULL if
* no $default is specified. * no $default is specified.
*/ */
@@ -1455,6 +1466,7 @@ class StreamWrapper {
* @param string $url * @param string $url
* A Swift URL. * A Swift URL.
* @retval array * @retval array
* @return array
* An array as documented in parse_url(). * An array as documented in parse_url().
*/ */
protected function parseUrl($url) { protected function parseUrl($url) {

View File

@@ -148,7 +148,8 @@ class StreamWrapperFS extends StreamWrapper {
* *
* @param string $path * @param string $path
* The directory path to test. * The directory path to test.
* @retval bool * @retval boolean
* @return boolean
* TRUE if the directory prefix exists and FALSE otherwise. * TRUE if the directory prefix exists and FALSE otherwise.
*/ */
protected function testDirectoryExists($path) { protected function testDirectoryExists($path) {

View File

@@ -61,6 +61,7 @@ class Subdir {
* The path is delimited using the string returned by delimiter(). * The path is delimited using the string returned by delimiter().
* *
* @retval string * @retval string
* @return string
* The path. * The path.
*/ */
public function path() { public function path() {
@@ -70,6 +71,7 @@ class Subdir {
* Get the delimiter used by the server. * Get the delimiter used by the server.
* *
* @retval string * @retval string
* @return string
* The value used as a delimiter. * The value used as a delimiter.
*/ */
public function delimiter() { public function delimiter() {

View File

@@ -72,6 +72,7 @@ class Transport {
* @endcode * @endcode
* *
* @retval HPCloud::Transport::Transporter * @retval HPCloud::Transport::Transporter
* @return \HPCloud\Transport\Transporter
* An initialized transporter. * An initialized transporter.
*/ */
public static function instance() { public static function instance() {

View File

@@ -278,6 +278,7 @@ class CURLTransport implements Transporter {
* @param resource $handle * @param resource $handle
* A CURL handle from curl_init(). * A CURL handle from curl_init().
* @retval boolean * @retval boolean
* @return boolean
* Returns a boolean value indicating whether or not CURL could process the * Returns a boolean value indicating whether or not CURL could process the
* request. * request.
*/ */
@@ -322,6 +323,7 @@ class CURLTransport implements Transporter {
* @param resource $file * @param resource $file
* A file pointer to the file that has the headers. * A file pointer to the file that has the headers.
* @retval array * @retval array
* @return array
* An array of headers, one header per line. * An array of headers, one header per line.
*/ */
protected function fetchHeaders($file) { protected function fetchHeaders($file) {

View File

@@ -207,6 +207,7 @@ class PHPStreamTransport implements Transporter {
* @param array $headers * @param array $headers
* An associative array of header names to header values. * An associative array of header names to header values.
* @retval string * @retval string
* @return string
* A string containing formatted headers. * A string containing formatted headers.
*/ */
protected function smashHeaders($headers) { protected function smashHeaders($headers) {

View File

@@ -143,6 +143,7 @@ class Response {
* (they are one and the same). * (they are one and the same).
* *
* @retval resource * @retval resource
* @return resource
* A file handle. * A file handle.
*/ */
public function file() { public function file() {
@@ -162,6 +163,7 @@ class Response {
* entire content in a string. * entire content in a string.
* *
* @retval string * @retval string
* @return string
* The contents of the response body. * The contents of the response body.
*/ */
public function content() { public function content() {
@@ -203,6 +205,7 @@ class Response {
* data. * data.
* *
* @retval array * @retval array
* @return array
* An associative array of metadata about the * An associative array of metadata about the
* transaction resulting in this response. * transaction resulting in this response.
*/ */
@@ -219,6 +222,7 @@ class Response {
* An optional default value. * An optional default value.
* *
* @retval mixed * @retval mixed
* @return mixed
* The value, if found, or the default, is specified, or NULL. * The value, if found, or the default, is specified, or NULL.
*/ */
public function header($name, $default = NULL) { public function header($name, $default = NULL) {
@@ -237,8 +241,9 @@ class Response {
* *
* These are available even if the stream has been closed. * These are available even if the stream has been closed.
* *
* @retval * @retval array
* array The array of headers. * @return array
* The array of headers.
*/ */
public function headers() { public function headers() {
return $this->headers; return $this->headers;
@@ -266,6 +271,7 @@ class Response {
* appear in a Response object. * appear in a Response object.
* *
* @retval int * @retval int
* @return int
* The HTTP code, e.g. 200 or 202. * The HTTP code, e.g. 200 or 202.
*/ */
public function status() { public function status() {
@@ -279,6 +285,7 @@ class Response {
* recommendations. e.g. 200 returns 'OK'. * recommendations. e.g. 200 returns 'OK'.
* *
* @retval string * @retval string
* @return string
* A server-generated status message. * A server-generated status message.
*/ */
public function statusMessage() { public function statusMessage() {
@@ -291,6 +298,7 @@ class Response {
* Example: HTTP/1.1 * Example: HTTP/1.1
* *
* @retval string * @retval string
* @return string
* The protocol name and version. * The protocol name and version.
*/ */
public function protocol() { public function protocol() {
@@ -308,6 +316,7 @@ class Response {
* An indexed array of headers, as returned by the PHP stream * An indexed array of headers, as returned by the PHP stream
* library. * library.
* @retval array * @retval array
* @return array
* An associative array of header name/value pairs. * An associative array of header name/value pairs.
*/ */
protected function parseHeaders($headerArray) { protected function parseHeaders($headerArray) {