public function Collection::set

Same name in this branch

Set a key value pair

Parameters

string $key Key to set:

mixed $value Value to set:

Return value

Collection Returns a reference to the object

2 calls to Collection::set()
Collection::offsetSet in drupal/core/vendor/guzzle/common/Guzzle/Common/Collection.php
ArrayAccess implementation of offsetGet()
Collection::overwriteWith in drupal/core/vendor/guzzle/common/Guzzle/Common/Collection.php
Over write key value pairs in this collection with all of the data from an array or collection.

File

drupal/core/vendor/guzzle/common/Guzzle/Common/Collection.php, line 342

Class

Collection
Key value pair collection object

Namespace

Guzzle\Common

Code

public function set($key, $value) {
  $this->data[$key] = $value;
  return $this;
}