public function remove ($key) {
        if (!$this->_r) {
            if (isset($this->_d[$key])) {
                $value = $this->_d[$key];
                unset($this->_d[$key]);
                return $value;
            } else {
                // it is possible the value is null, which is not detected by isset
                unset($this->_d[$key]);
                return null;
            }
        } else
            throw new Exception(Yii::t ('yii' , 'The map is read only.'));
    }
public function remove ($key) {
        if (!$this->_r) {
            if (isset($this->_d[$key])) {
                $value = $this->_d[$key];
                unset($this->_d[$key]);
                return $value;
            } else {
                // it is possible the value is null, which is not detected by isset
                unset($this->_d[$key]);
                return null;
            }
        } else
            throw new Exception(Yii::t ('yii' , 'The map is read only.'));
    }
public function remove ( $ key ) { if ( ! $ this -> _r ) { if ( isset ( $ this -> _d [ $ key ] ) ) { $ value = $ this -> _d [ $ key ] ; unset ( $ this -> _d [ $ key ] ) ; return $ value ; } else { // it is possible the value is null, which is not detected by isset unset ( $ this -> _d [ $ key ] ) ; return null ; } } else throw new Exception ( Yii :: t ( 'yii' , 'The map is read only.' ) ) ; }
Removes an item from the map by its key.
@param mixed $key the key of the item to be removed
@return mixed the removed value, null if no such key exists.
@throws \yii\base\Exception if the map is read-only
Removes an item from the map by its key .