src/Data/DefaultCollection.php
public function insert($index, ModelInterface $model)
    {
        if ($model->hasProperties()) {
            \array_insert($this->arrCollection, $index, [$model]);
        }
    }
public function insert($index, ModelInterface $model)
    {
        if ($model->hasProperties()) {
            \array_insert($this->arrCollection, $index, [$model]);
        }
    }
public function insert ( $ index , ModelInterface $ model ) { if ( $ model -> hasProperties ( ) ) { \ array_insert ( $ this -> arrCollection , $ index , [ $ model ] ) ; } }
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            $index The index where the model shall be placed.
@param ModelInterface $model The model to insert.

@return void
Insert a record at the specific position .