public function removePlugin($key) {
        if (!isset($this->plugins[$key])) {
            return $this;
        }
        if (method_exists($this->plugins[$key], 'unconfigure')) {
            $this->plugins[$key]->unconfigure($this);
        }
        unset($this->plugins[$key]);
        return $this;
    }