Updated the set calls to return so they can be used in chaining.
This commit is contained in:
@@ -412,9 +412,15 @@ class Container implements \Countable, \IteratorAggregate {
|
||||
* Names can be no longer than 128 characters, and values can be no
|
||||
* more than 256. UTF-8 or ASCII characters are allowed, though ASCII
|
||||
* seems to be preferred.
|
||||
*
|
||||
* @retval HPCloud::Storage::ObjectStorage::Container
|
||||
* @return \HPCloud\Storage\ObjectStorage\Container
|
||||
* $this so the method can be used in chaining.
|
||||
*/
|
||||
public function setMetadata($metadata) {
|
||||
$this->metadata = $metadata;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -147,9 +147,14 @@ class Object {
|
||||
*
|
||||
* @param array $array
|
||||
* An associative array of metadata names to values.
|
||||
*
|
||||
* @retval HPCloud::Storage::ObjectStorage::Object
|
||||
* @return \HPCloud\Storage\ObjectStorage\Object
|
||||
* $this so the method can be used in chaining.
|
||||
*/
|
||||
public function setMetadata(array $array) {
|
||||
$this->metadata = $array;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -178,6 +183,10 @@ class Object {
|
||||
*
|
||||
* @param string $name
|
||||
* A file or object name.
|
||||
*
|
||||
* @retval HPCloud::Storage::ObjectStorage::Object
|
||||
* @return \HPCloud\Storage\ObjectStorage\Object
|
||||
* $this so the method can be used in chaining.
|
||||
*/
|
||||
public function setName($name) {
|
||||
$this->name = $name;
|
||||
@@ -223,6 +232,10 @@ class Object {
|
||||
*
|
||||
* @param string $type
|
||||
* A valid content type.
|
||||
*
|
||||
* @retval HPCloud::Storage::ObjectStorage::Object
|
||||
* @return \HPCloud\Storage\ObjectStorage\Object
|
||||
* $this so the method can be used in chaining.
|
||||
*/
|
||||
public function setContentType($type) {
|
||||
$this->contentType = $type;
|
||||
@@ -261,6 +274,10 @@ class Object {
|
||||
* @param string $type
|
||||
* The content type (MIME type). This can be set here for
|
||||
* convenience, or you can call setContentType() directly.
|
||||
*
|
||||
* @retval HPCloud::Storage::ObjectStorage::Object
|
||||
* @return \HPCloud\Storage\ObjectStorage\Object
|
||||
* $this so the method can be used in chaining.
|
||||
*/
|
||||
public function setContent($content, $type = NULL) {
|
||||
$this->content = $content;
|
||||
@@ -348,9 +365,15 @@ class Object {
|
||||
*
|
||||
* @param string $encoding
|
||||
* A valid encoding type.
|
||||
*
|
||||
* @retval HPCloud::Storage::ObjectStorage::Object
|
||||
* @return \HPCloud\Storage\ObjectStorage\Object
|
||||
* $this so the method can be used in chaining.
|
||||
*/
|
||||
public function setEncoding($encoding) {
|
||||
$this->contentEncoding = $encoding;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -386,9 +409,15 @@ class Object {
|
||||
* @param string $disposition
|
||||
* A valid disposition declaration. These are defined in various
|
||||
* HTTP specifications.
|
||||
*
|
||||
* @retval HPCloud::Storage::ObjectStorage::Object
|
||||
* @return \HPCloud\Storage\ObjectStorage\Object
|
||||
* $this so the method can be used in chaining.
|
||||
*/
|
||||
public function setDisposition($disposition) {
|
||||
$this->contentDisposition = $disposition;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -436,9 +465,14 @@ class Object {
|
||||
* An associative array where each name is an HTTP header name, and
|
||||
* each value is the HTTP header value. No encoding or escaping is
|
||||
* done.
|
||||
*
|
||||
* @retval HPCloud::Storage::ObjectStorage::Object
|
||||
* @return \HPCloud\Storage\ObjectStorage\Object
|
||||
* $this so the method can be used in chaining.
|
||||
*/
|
||||
public function setAdditionalHeaders($headers) {
|
||||
$this->additionalHeaders = $headers;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -268,6 +268,8 @@ class RemoteObject extends Object {
|
||||
$this->allHeaders[$name] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -478,9 +480,14 @@ class RemoteObject extends Object {
|
||||
* @param boolean $enabled
|
||||
* If this is TRUE, caching will be enabled. If this is FALSE,
|
||||
* caching will be disabled.
|
||||
*
|
||||
* @retval HPCloud::Storage::ObjectStorage::RemoteObject
|
||||
* @return \HPCloud\Storage\ObjectStorage\RemoteObject
|
||||
* $this so the method can be used in chaining.
|
||||
*/
|
||||
public function setCaching($enabled) {
|
||||
$this->caching = $enabled;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -518,9 +525,14 @@ class RemoteObject extends Object {
|
||||
* If this is TRUE, content verification is performed. The content
|
||||
* is hashed and checked against a server-supplied MD5 hashcode. If
|
||||
* this is FALSE, no checking is done.
|
||||
*
|
||||
* @retval HPCloud::Storage::ObjectStorage::RemoteObject
|
||||
* @return \HPCloud\Storage\ObjectStorage\RemoteObject
|
||||
* $this so the method can be used in chaining.
|
||||
*/
|
||||
public function setContentVerification($enabled) {
|
||||
$this->contentVerification = $enabled;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1320,6 +1320,10 @@ class StreamWrapper {
|
||||
*
|
||||
* @param string $mode
|
||||
* The mode string, e.g. `r+` or `wb`.
|
||||
*
|
||||
* @retval HPCloud::Storage::ObjectStorage::StreamWrapper
|
||||
* @return \HPCloud\Storage\ObjectStorage\StreamWrapper
|
||||
* $this so the method can be used in chaining.
|
||||
*/
|
||||
protected function setMode($mode) {
|
||||
$mode = strtolower($mode);
|
||||
@@ -1391,6 +1395,7 @@ class StreamWrapper {
|
||||
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -389,5 +389,7 @@ class CURLTransport implements Transporter {
|
||||
}
|
||||
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, $buffer);
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user