static public function check($options)
    {
        $error = ini_get('error_reporting');
        error_reporting(E_ERROR);
        
        try {
            // Test the db connection
            $options['adapter']   = preg_replace('/[^A-Z0-9_\.-]/i', '', $options['adapter']);
            $class = self::$adapterNamespace . ucfirst(strtolower($options['adapter'])) . 'Adapter';
            
            if (!class_exists($class)) {
                return 'db adapter ' . $class . ' is not valid.';
            } else {
                $conn = new $class($db);
            }
            error_reporting($error);
            return null;
        } catch (Exception $e) {
            error_reporting($error);
            return $e->getMessage();
        }
    }
static public function check($options)
    {
        $error = ini_get('error_reporting');
        error_reporting(E_ERROR);
        
        try {
            // Test the db connection
            $options['adapter']   = preg_replace('/[^A-Z0-9_\.-]/i', '', $options['adapter']);
            $class = self::$adapterNamespace . ucfirst(strtolower($options['adapter'])) . 'Adapter';
            
            if (!class_exists($class)) {
                return 'db adapter ' . $class . ' is not valid.';
            } else {
                $conn = new $class($db);
            }
            error_reporting($error);
            return null;
        } catch (Exception $e) {
            error_reporting($error);
            return $e->getMessage();
        }
    }
static public function check ( $ options ) { $ error = ini_get ( 'error_reporting' ) ; error_reporting ( E_ERROR ) ; try { // Test the db connection $ options [ 'adapter' ] = preg_replace ( '/[^A-Z0-9_\.-]/i' , '' , $ options [ 'adapter' ] ) ; $ class = self :: $ adapterNamespace . ucfirst ( strtolower ( $ options [ 'adapter' ] ) ) . 'Adapter' ; if ( ! class_exists ( $ class ) ) { return 'db adapter ' . $ class . ' is not valid.' ; } else { $ conn = new $ class ( $ db ) ; } error_reporting ( $ error ) ; return null ; } catch ( Exception $ e ) { error_reporting ( $ error ) ; return $ e -> getMessage ( ) ; } }
Check the database

@param  array  $options

@return string if success return null, failure return error message
Check the database