lithium\data\Collection::offsetSet PHP Method

offsetSet() public method

Adds the specified object to the Collection instance, and assigns associated metadata to the added object.
public offsetSet ( string $offset, mixed $data ) : mixed
$offset string The offset to assign the value to.
$data mixed The entity object to add.
return mixed Returns the set `Entity` object.
    public function offsetSet($offset, $data)
    {
        $this->offsetGet($offset);
        return $this->_set($data, $offset);
    }