public function isConnected()
    {
        if ($this->_connection === null) {
            $connected = false;
        } else {
            try {
                $connected = $this->_connection->query('SELECT 1');
            } catch (PDOException $e) {
                $connected = false;
            }
        }

        return (bool)$connected;
    }
public function isConnected()
    {
        if ($this->_connection === null) {
            $connected = false;
        } else {
            try {
                $connected = $this->_connection->query('SELECT 1');
            } catch (PDOException $e) {
                $connected = false;
            }
        }

        return (bool)$connected;
    }
public function isConnected ( ) { if ( $ this -> _connection === null ) { $ connected = false ; } else { try { $ connected = $ this -> _connection -> query ( 'SELECT 1' ) ; } catch ( PDOException $ e ) { $ connected = false ; } } return ( bool ) $ connected ; }
Checks whether or not the driver is connected.

@return bool
Checks whether or not the driver is connected .