summaryrefslogtreecommitdiffstats
path: root/apps/files_external/3rdparty/google-api-php-client/src/Google/Collection.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/3rdparty/google-api-php-client/src/Google/Collection.php')
-rw-r--r--apps/files_external/3rdparty/google-api-php-client/src/Google/Collection.php32
1 files changed, 17 insertions, 15 deletions
diff --git a/apps/files_external/3rdparty/google-api-php-client/src/Google/Collection.php b/apps/files_external/3rdparty/google-api-php-client/src/Google/Collection.php
index 60909a967a4..6e7bf9b0f1e 100644
--- a/apps/files_external/3rdparty/google-api-php-client/src/Google/Collection.php
+++ b/apps/files_external/3rdparty/google-api-php-client/src/Google/Collection.php
@@ -13,29 +13,31 @@ class Google_Collection extends Google_Model implements Iterator, Countable
public function rewind()
{
- if (is_array($this->data[$this->collection_key])) {
- reset($this->data[$this->collection_key]);
+ if (isset($this->modelData[$this->collection_key])
+ && is_array($this->modelData[$this->collection_key])) {
+ reset($this->modelData[$this->collection_key]);
}
}
public function current()
{
$this->coerceType($this->key());
- if (is_array($this->data[$this->collection_key])) {
- return current($this->data[$this->collection_key]);
+ if (is_array($this->modelData[$this->collection_key])) {
+ return current($this->modelData[$this->collection_key]);
}
}
public function key()
{
- if (is_array($this->data[$this->collection_key])) {
- return key($this->data[$this->collection_key]);
+ if (isset($this->modelData[$this->collection_key])
+ && is_array($this->modelData[$this->collection_key])) {
+ return key($this->modelData[$this->collection_key]);
}
}
public function next()
{
- return next($this->data[$this->collection_key]);
+ return next($this->modelData[$this->collection_key]);
}
public function valid()
@@ -46,7 +48,7 @@ class Google_Collection extends Google_Model implements Iterator, Countable
public function count()
{
- return count($this->data[$this->collection_key]);
+ return count($this->modelData[$this->collection_key]);
}
public function offsetExists ($offset)
@@ -54,7 +56,7 @@ class Google_Collection extends Google_Model implements Iterator, Countable
if (!is_numeric($offset)) {
return parent::offsetExists($offset);
}
- return isset($this->data[$this->collection_key][$offset]);
+ return isset($this->modelData[$this->collection_key][$offset]);
}
public function offsetGet($offset)
@@ -63,7 +65,7 @@ class Google_Collection extends Google_Model implements Iterator, Countable
return parent::offsetGet($offset);
}
$this->coerceType($offset);
- return $this->data[$this->collection_key][$offset];
+ return $this->modelData[$this->collection_key][$offset];
}
public function offsetSet($offset, $value)
@@ -71,7 +73,7 @@ class Google_Collection extends Google_Model implements Iterator, Countable
if (!is_numeric($offset)) {
return parent::offsetSet($offset, $value);
}
- $this->data[$this->collection_key][$offset] = $value;
+ $this->modelData[$this->collection_key][$offset] = $value;
}
public function offsetUnset($offset)
@@ -79,16 +81,16 @@ class Google_Collection extends Google_Model implements Iterator, Countable
if (!is_numeric($offset)) {
return parent::offsetUnset($offset);
}
- unset($this->data[$this->collection_key][$offset]);
+ unset($this->modelData[$this->collection_key][$offset]);
}
private function coerceType($offset)
{
$typeKey = $this->keyType($this->collection_key);
- if (isset($this->$typeKey) && !is_object($this->data[$this->collection_key][$offset])) {
+ if (isset($this->$typeKey) && !is_object($this->modelData[$this->collection_key][$offset])) {
$type = $this->$typeKey;
- $this->data[$this->collection_key][$offset] =
- new $type($this->data[$this->collection_key][$offset]);
+ $this->modelData[$this->collection_key][$offset] =
+ new $type($this->modelData[$this->collection_key][$offset]);
}
}
}