/** * Sets the value at the specified index * ensures the value has ArrayAccess * * @see ArrayObject::offsetSet() */ function offsetSet($index, $newval) { if (is_numeric($index)) { $index = (int) $index; } return parent::offsetSet($index, SimpleCollection::arrayToArrayObject($newval)); }