lithium\data\Collection::offsetSet()

public method

Adds the specified object to the Collection instance, and assigns associated metadata to the added object.

Parameters

  • string $offset

    The offset to assign the value to.

  • mixed $data

    The entity object to add.

Returns

mixed

Returns the set Entity object.

Source

	public function offsetSet($offset, $data) {
		$this->offsetGet($offset);
		return $this->_set($data, $offset);
	}