You are here

public function AbstractLazyCollection::set in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php \Doctrine\Common\Collections\AbstractLazyCollection::set()

Sets an element in the collection at the specified key/index.

Parameters

string|integer $key The key/index of the element to set.:

mixed $value The element to set.:

Return value

void

Overrides Collection::set

File

vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php, line 146

Class

AbstractLazyCollection
Lazy collection that is backed by a concrete collection

Namespace

Doctrine\Common\Collections

Code

public function set($key, $value) {
  $this
    ->initialize();
  $this->collection
    ->set($key, $value);
}