public function insertAt ($index , $item) {
        if ($item instanceof $this->_type)
            parent::insertAt ($index , $item);
        else
            throw new Exception(\Yii::t ('yii' , 'CTypedList<{type}> can only hold objects of {type} class.' ,
                array('{type}' => $this->_type)));
    }
public function insertAt ($index , $item) {
        if ($item instanceof $this->_type)
            parent::insertAt ($index , $item);
        else
            throw new Exception(\Yii::t ('yii' , 'CTypedList<{type}> can only hold objects of {type} class.' ,
                array('{type}' => $this->_type)));
    }
public function insertAt ( $ index , $ item ) { if ( $ item instanceof $ this -> _type ) parent :: insertAt ( $ index , $ item ) ; else throw new Exception ( \ Yii :: t ( 'yii' , 'CTypedList<{type}> can only hold objects of {type} class.' , array ( '{type}' => $ this -> _type ) ) ) ; }
Inserts an item at the specified position.
This method overrides the parent implementation by
checking the item to be inserted is of certain type.
@param integer $index the specified position.
@param mixed $item new item
@throws \yii\base\Exception If the index specified exceeds the bound,
the list is read-only or the element is not of the expected type.
Inserts an item at the specified position . This method overrides the parent implementation by checking the item to be inserted is of certain type .