protected static function checkDatabase($key)
    {
        $driver = self::$params['database']['default'];
        //
        if (array_key_exists($key, self::$params['database'])) {
            return true;
        } elseif (array_key_exists($key, self::$params['database']['connections'][$driver])) {
            return true;
        } else {
            self::exception('database', $key);
        }
    }