/** * Sets the element at a given offset. Required by the ArrayAccess interface. * * @param mixed $offset * @param mixed $item * * @return null */ public function offsetSet($offset, $item) { if (is_numeric($offset) && $item instanceof BaseElementModel) { $this->_matchedElementsAtOffsets[$offset] = $item; } else { return parent::offsetSet($offset, $item); } }