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.'));
    }