/** * Insert a record at the specific position. * * Move all records at position >= $index one index up. * If $index is out of bounds, just add at the end (does not fill with empty records!). * * @param int $intIndex The index where the model shall be placed. * * @param ModelInterface $objModel The model to insert. * * @return void */ public function insert($intIndex, ModelInterface $objModel) { if ($objModel->hasProperties()) { array_insert($this->arrCollection, $intIndex, array($objModel)); } }