public function add ($key , $value) {
        if (!$this->_r) {
            if ($key === null)
                $this->_d[] = $value;
            else
                $this->_d[$key] = $value;
        } else
            throw new Exception(Yii::t ('yii' , 'The map is read only.'));
    }
public function add ($key , $value) {
        if (!$this->_r) {
            if ($key === null)
                $this->_d[] = $value;
            else
                $this->_d[$key] = $value;
        } else
            throw new Exception(Yii::t ('yii' , 'The map is read only.'));
    }
public function add ( $ key , $ value ) { if ( ! $ this -> _r ) { if ( $ key === null ) $ this -> _d [ ] = $ value ; else $ this -> _d [ $ key ] = $ value ; } else throw new Exception ( Yii :: t ( 'yii' , 'The map is read only.' ) ) ; }
Adds an item into the map.
Note, if the specified key already exists, the old value will be overwritten.
@param mixed $key key
@param mixed $value value
@throws \yii\base\Exception if the map is read-only
Adds an item into the map . Note if the specified key already exists the old value will be overwritten .