Cleared all of the Doxy warnings that I can.
This commit is contained in:
@@ -163,7 +163,7 @@ class Bootstrap {
|
||||
* Common configuration directives:
|
||||
*
|
||||
* - 'transport': The namespaced classname for the transport that
|
||||
* should be used. Example: `\HPCloud\Transport\CURLTransport`
|
||||
* should be used. Example: @code \HPCloud\Transport\CURLTransport @endcode
|
||||
* - 'transport.debug': The integer 1 for enabling debug, 0 for
|
||||
* disabling. Enabling will turn on verbose debugging output
|
||||
* for any transport that supports it.
|
||||
@@ -193,7 +193,7 @@ class Bootstrap {
|
||||
*
|
||||
* This is a special-purpose autoloader for loading
|
||||
* only the HPCloud classes. It will not attempt to
|
||||
* autoload anything outside of the \HPCloud namespace.
|
||||
* autoload anything outside of the HPCloud namespace.
|
||||
*
|
||||
* Because this is a special-purpose autoloader, it
|
||||
* should be safe to use with other special-purpose
|
||||
|
||||
@@ -654,7 +654,7 @@ class IdentityServices {
|
||||
* This parses the JSON data and parcels out the data to the appropriate
|
||||
* fields.
|
||||
*
|
||||
* @param HPCloud::Transport::Response $response
|
||||
* @param object $response HPCloud::Transport::Response
|
||||
* A response object.
|
||||
*/
|
||||
protected function handleResponse($response) {
|
||||
|
||||
@@ -323,15 +323,17 @@ class ObjectStorage {
|
||||
* ?>
|
||||
* @endcode
|
||||
*
|
||||
* For details on ACLs, see \HPCloud\Storage\ObjectStorage\ACL.
|
||||
* For details on ACLs, see HPCloud::Storage::ObjectStorage::ACL.
|
||||
*
|
||||
* @param string $name
|
||||
* The name of the container.
|
||||
* @param HPCloud::Storage::ObjectStorage::ACL $acl
|
||||
* @param object $acl HPCloud::Storage::ObjectStorage::ACL
|
||||
* An access control list object. By default, a container is
|
||||
* non-public (private). To change this behavior, you can add a
|
||||
* custom ACL. To make the container publically readable, you can
|
||||
* use this: `ACL::makePublic()`.
|
||||
* use this: HPCloud::Storage::ObjectStorage::ACL::makePublic().
|
||||
* @param array $metadata
|
||||
* An associative array of metadata to attach to the container.
|
||||
* @retval boolean
|
||||
* TRUE if the container was created, FALSE if the container was not
|
||||
* created because it already exists.
|
||||
@@ -380,7 +382,7 @@ class ObjectStorage {
|
||||
*
|
||||
* @param string $name
|
||||
* The name of the container.
|
||||
* @param HPCloud::Storage::ObjectStorage::ACL $acl
|
||||
* @param object $acl HPCloud::Storage::ObjectStorage::ACL
|
||||
* An ACL. To make the container publically readable, use
|
||||
* ACL::makePublic().
|
||||
* @retval boolean
|
||||
|
||||
@@ -326,6 +326,8 @@ class ACL {
|
||||
* Note that a simple minus sign ('-') is illegal, though it seems it
|
||||
* should be "disallow all hosts."
|
||||
*
|
||||
* @param string $perm
|
||||
* The permission being granted. One of ACL:READ, ACL::WRITE, or ACL::READ_WRITE.
|
||||
* @param string $host
|
||||
* A host specification string as described above.
|
||||
*/
|
||||
|
||||
@@ -182,7 +182,7 @@ class Container implements \Countable, \IteratorAggregate {
|
||||
*
|
||||
* @param string $name
|
||||
* The name of the container.
|
||||
* @param \HPCloud\Transport\Response $respose
|
||||
* @param object $response HPCloud::Transport::Response
|
||||
* The HTTP response object from the Transporter layer
|
||||
* @param string $token
|
||||
* The auth token.
|
||||
@@ -333,8 +333,11 @@ class Container implements \Countable, \IteratorAggregate {
|
||||
* and stores it in the given container in the present
|
||||
* container on the remote object store.
|
||||
*
|
||||
* @param HPCloud::Storage::ObjectStorage::Object $obj
|
||||
* @param object $obj HPCloud::Storage::ObjectStorage::Object
|
||||
* The object to store.
|
||||
* @param resource $file
|
||||
* An optional file argument that, if set, will be treated as the
|
||||
* contents of the object.
|
||||
* @retval boolean
|
||||
* TRUE if the object was saved.
|
||||
* @throws HPCloud::Transport::LengthRequiredException
|
||||
@@ -450,7 +453,7 @@ class Container implements \Countable, \IteratorAggregate {
|
||||
* particularly in cases where custom headers have been set.
|
||||
* Use with caution.
|
||||
*
|
||||
* @param HPCloud::Storage::ObjectStorage::Object $obj
|
||||
* @param object $obj HPCloud::Storage::ObjectStorage::Object
|
||||
* The object to update.
|
||||
*
|
||||
* @retval boolean
|
||||
@@ -498,7 +501,7 @@ class Container implements \Countable, \IteratorAggregate {
|
||||
* Note that there is no MOVE operation. You must copy and then DELETE
|
||||
* in order to achieve that.
|
||||
*
|
||||
* @param HPCloud::Storage::ObjectStorage::Object $obj
|
||||
* @param object $obj HPCloud::Storage::ObjectStorage::Object
|
||||
* The object to copy. This object MUST already be saved on the
|
||||
* remote server. The body of the object is not sent. Instead, the
|
||||
* copy operation is performed on the remote server. You can, and
|
||||
@@ -658,7 +661,7 @@ class Container implements \Countable, \IteratorAggregate {
|
||||
* @param int $limit
|
||||
* An integer indicating the maximum number of items to return. This
|
||||
* cannot be greater than the Swift maximum (10k).
|
||||
* @param string $maker
|
||||
* @param string $marker
|
||||
* The name of the object to start with. The query will begin with
|
||||
* the next object AFTER this one.
|
||||
* @retval array
|
||||
@@ -787,7 +790,8 @@ class Container implements \Countable, \IteratorAggregate {
|
||||
* Container was set to be public (See
|
||||
* ObjectStorage::createContainer()) will be accessible by this URL.
|
||||
*
|
||||
* @retval
|
||||
* @retval string
|
||||
* The URL.
|
||||
*/
|
||||
public function url() {
|
||||
return $this->url;
|
||||
|
||||
@@ -154,7 +154,7 @@ class Object {
|
||||
* object store.
|
||||
*
|
||||
* To copy an object, see
|
||||
* \HPCloud\Storage\ObjectStorage\Container::copyObject().
|
||||
* HPCloud::Storage::ObjectStorage::Container::copyObject().
|
||||
*
|
||||
* @param string $name
|
||||
* A file or object name.
|
||||
|
||||
@@ -184,7 +184,7 @@ use \HPCloud\Storage\ObjectStorage;
|
||||
*
|
||||
* This section details paramters that can be passed <i>either</i>
|
||||
* through a stream context <i>or</i> through
|
||||
* \HPCloud\Bootstrap::setConfiguration().
|
||||
* HPCloud::Bootstrap::setConfiguration().
|
||||
*
|
||||
* @attention
|
||||
* PHP functions that do not allow you to pass a context may still be supported
|
||||
@@ -202,7 +202,7 @@ use \HPCloud\Storage\ObjectStorage;
|
||||
* to an account and tenant ID.
|
||||
*
|
||||
* The following parameters may be set either in the stream context
|
||||
* or through \HPCloud\Bootstrap::setConfiguration():
|
||||
* or through HPCloud::Bootstrap::setConfiguration():
|
||||
*
|
||||
* - token: An auth token. If this is supplied, authentication is skipped and
|
||||
* this token is used. NOTE: You MUST set swift_endpoint if using this
|
||||
@@ -300,6 +300,20 @@ class StreamWrapper {
|
||||
*
|
||||
* This closes a directory handle, freeing up the resources.
|
||||
*
|
||||
* @code
|
||||
* <?php
|
||||
*
|
||||
* // Assuming a valid context in $cxt...
|
||||
*
|
||||
* // Get the container as if it were a directory.
|
||||
* $dir = opendir('swift://mycontainer', $cxt);
|
||||
*
|
||||
* // Do something with $dir
|
||||
*
|
||||
* closedir($dir);
|
||||
* ?>
|
||||
* @endcode
|
||||
*
|
||||
* NB: Some versions of PHP 5.3 don't clear all buffers when
|
||||
* closing, and the handle can occasionally remain accessible for
|
||||
* some period of time.
|
||||
@@ -316,6 +330,20 @@ class StreamWrapper {
|
||||
/**
|
||||
* Open a directory for reading.
|
||||
*
|
||||
* @code
|
||||
* <?php
|
||||
*
|
||||
* // Assuming a valid context in $cxt...
|
||||
*
|
||||
* // Get the container as if it were a directory.
|
||||
* $dir = opendir('swift://mycontainer', $cxt);
|
||||
*
|
||||
* // Do something with $dir
|
||||
*
|
||||
* closedir($dir);
|
||||
* ?>
|
||||
* @endcode
|
||||
*
|
||||
* See opendir() and scandir().
|
||||
*
|
||||
* @param string $path
|
||||
@@ -361,6 +389,21 @@ class StreamWrapper {
|
||||
* Read an entry from the directory.
|
||||
*
|
||||
* This gets a single line from the directory.
|
||||
* @code
|
||||
* <?php
|
||||
*
|
||||
* // Assuming a valid context in $cxt...
|
||||
*
|
||||
* // Get the container as if it were a directory.
|
||||
* $dir = opendir('swift://mycontainer', $cxt);
|
||||
*
|
||||
* while (($entry = readdir($dir)) !== FALSE) {
|
||||
* print $entry . PHP_EOL;
|
||||
* }
|
||||
*
|
||||
* closedir($dir);
|
||||
* ?>
|
||||
* @endcode
|
||||
*
|
||||
* @retval string
|
||||
* The name of the resource or FALSE when the directory has no more
|
||||
@@ -395,6 +438,25 @@ class StreamWrapper {
|
||||
* Rewind to the beginning of the listing.
|
||||
*
|
||||
* This repositions the read pointer at the first entry in the directory.
|
||||
* @code
|
||||
* <?php
|
||||
*
|
||||
* // Assuming a valid context in $cxt...
|
||||
*
|
||||
* // Get the container as if it were a directory.
|
||||
* $dir = opendir('swift://mycontainer', $cxt);
|
||||
*
|
||||
* while (($entry = readdir($dir)) !== FALSE) {
|
||||
* print $entry . PHP_EOL;
|
||||
* }
|
||||
*
|
||||
* rewinddir($dir);
|
||||
*
|
||||
* $first = readdir($dir);
|
||||
*
|
||||
* closedir($dir);
|
||||
* ?>
|
||||
* @endcode
|
||||
*/
|
||||
public function dir_rewinddir() {
|
||||
$this->dirIndex = 0;
|
||||
@@ -420,6 +482,24 @@ class StreamWrapper {
|
||||
*
|
||||
* See Container::copy().
|
||||
*
|
||||
* @code
|
||||
* <?php
|
||||
* Bootstrap::setConfiguration(array(
|
||||
* 'tenantid' => '1234',
|
||||
* 'account' => '1234',
|
||||
* 'secret' => '4321',
|
||||
* 'endpoint' => 'https://auth.example.com',
|
||||
* ));
|
||||
*
|
||||
* $from = 'swift://containerOne/file.txt';
|
||||
* $to = 'swift://containerTwo/file.txt';
|
||||
*
|
||||
* // Rename can also take a context as a third param.
|
||||
* rename($from, $to);
|
||||
*
|
||||
* ?>
|
||||
* @endcode
|
||||
*
|
||||
* @param string $path_from
|
||||
* A swift URL that exists on the remote.
|
||||
* @param string $path_to
|
||||
@@ -458,9 +538,11 @@ class StreamWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
public function copy($path_from, $path_to) {
|
||||
throw new \Exception("UNDOCUMENTED.");
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Cast stream into a lower-level stream.
|
||||
@@ -479,9 +561,23 @@ class StreamWrapper {
|
||||
/**
|
||||
* Close a stream, writing if necessary.
|
||||
*
|
||||
* @code
|
||||
* <?php
|
||||
*
|
||||
* // Assuming $cxt has a valid context.
|
||||
*
|
||||
* $file = fopen('swift://container/file.txt', 'r', FALSE, $cxt);
|
||||
*
|
||||
* fclose($file);
|
||||
*
|
||||
* ?>
|
||||
* @endcode
|
||||
*
|
||||
* This will close the present stream. Importantly,
|
||||
* this will also write to the remote object storage if
|
||||
* any changes have been made locally.
|
||||
*
|
||||
* See stream_open().
|
||||
*/
|
||||
public function stream_close() {
|
||||
|
||||
@@ -504,6 +600,8 @@ class StreamWrapper {
|
||||
* This checks whether the stream has reached the
|
||||
* end of the object's contents.
|
||||
*
|
||||
* Called when \c feof() is called on a stream.
|
||||
*
|
||||
* See stream_seek().
|
||||
*
|
||||
* @retval boolean
|
||||
@@ -518,6 +616,8 @@ class StreamWrapper {
|
||||
*
|
||||
* If the local copy of this object has been modified,
|
||||
* it is written remotely.
|
||||
*
|
||||
* Called when \c fflush() is called on a stream.
|
||||
*/
|
||||
public function stream_flush() {
|
||||
try {
|
||||
@@ -596,6 +696,7 @@ class StreamWrapper {
|
||||
* print $bytes;
|
||||
* }
|
||||
* fclose($file);
|
||||
* ?>
|
||||
* @endcode
|
||||
*
|
||||
* If a file is opened in write mode, its contents will be retrieved from the
|
||||
@@ -794,6 +895,9 @@ class StreamWrapper {
|
||||
/**
|
||||
* Perform a seek.
|
||||
*
|
||||
* This is called whenever \c fseek() or \c rewind() is called on a
|
||||
* Swift stream.
|
||||
*
|
||||
* @attention
|
||||
* IMPORTANT: Unlike the PHP core, this library
|
||||
* allows you to fseek() inside of a file opened
|
||||
@@ -842,6 +946,10 @@ class StreamWrapper {
|
||||
* ?>
|
||||
* @endcode
|
||||
*
|
||||
* To use standard \c stat() on a Swift stream, you will
|
||||
* need to set account information (tenant ID, account ID, secret,
|
||||
* etc.) through HPCloud::Bootstrap::setConfiguration().
|
||||
*
|
||||
* @retval array
|
||||
* The stats array.
|
||||
*/
|
||||
@@ -937,6 +1045,10 @@ class StreamWrapper {
|
||||
* delete either one. If you are using directory markers, not that deleting
|
||||
* a marker will NOT delete the contents of the "directory".
|
||||
*
|
||||
* @attention
|
||||
* You will need to use HPCloud::Bootstrap::setConfiguration() to set the
|
||||
* necessary stream configuration, since \c unlink() does not take a context.
|
||||
*
|
||||
* @param string $path
|
||||
* The URL.
|
||||
* @retval boolean
|
||||
@@ -971,6 +1083,9 @@ class StreamWrapper {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @see stream_stat().
|
||||
*/
|
||||
public function url_stat($path, $flags) {
|
||||
$url = $this->parseUrl($path);
|
||||
|
||||
@@ -997,7 +1112,7 @@ class StreamWrapper {
|
||||
* Get the Object.
|
||||
*
|
||||
* This provides low-level access to the
|
||||
* \PHCloud\Storage\ObjectStorage\Object instance in which the content
|
||||
* PHCloud::Storage::ObjectStorage::Object instance in which the content
|
||||
* is stored.
|
||||
*
|
||||
* Accessing the object's payload (Object::content()) is strongly
|
||||
@@ -1264,7 +1379,7 @@ class StreamWrapper {
|
||||
* Based on the context, initialize the ObjectStorage.
|
||||
*
|
||||
* The following parameters may be set either in the stream context
|
||||
* or through \HPCloud\Bootstrap::setConfiguration():
|
||||
* or through HPCloud::Bootstrap::setConfiguration():
|
||||
*
|
||||
* - token: An auth token. If this is supplied, authentication is skipped and
|
||||
* this token is used. NOTE: You MUST set swift_endpoint if using this
|
||||
|
||||
Reference in New Issue
Block a user