Adds/sets an element in the collection at the index / with the specified key.
When the collection is a Map this is like put(key,value)/add(key,value). When the collection is a List this is like add(position,value).
mixed $key:
mixed $value:
Overrides Collection::set
public function set($key, $value) {
$this->_elements[$key] = $value;
}