protected function dbDelete($category, $key = null)
    {
        if ($key === null) {
            $this->getDb()->createCommand('
                DELETE FROM
                    {{setting}}
                WHERE
                    `category` = :category
            ', compact('category'))->execute();
        }

        if (is_string($key)) {
            $this->getDb()->createCommand('
                    DELETE FROM
                        {{setting}}
                    WHERE
                        `category` = :category
                        AND `key` = :key
                ', compact('category', 'key'))->execute();
        }

        if (is_array($key)) {
            foreach ($key as $val) {
                $this->dbDelete($category, $val);
            }
        }
    }