public function ping($addQuery = false, $debugClient = false)
    {
        try {
            $this->doPing($addQuery, $debugClient);

            return true;
        } catch (ClientException $e) {
            // Thrown for 400 level errors
            $this->messages[] = Trans::__(
                'page.extend.error-message-client',
                ['%errormessage%' => $e->getMessage()]
            );
        } catch (ServerException $e) {
            // Thrown for 500 level errors
            $this->messages[] = Trans::__(
                'page.extend.error-message-server',
                ['%errormessage%' => $e->getMessage()]
            );
        } catch (RequestException $e) {
            // Thrown for connection timeout, DNS errors, etc
            $this->messages[] = Trans::__(
                'page.extend.error-message-connection',
                ['%errormessage%' => $e->getMessage()]
            );
        } catch (\Exception $e) {
            // Catch all
            $this->messages[] = Trans::__(
                'page.extend.error-message-generic',
                ['%errormessage%' => $e->getMessage()]
            );
        }

        return false;
    }
public function ping($addQuery = false, $debugClient = false)
    {
        try {
            $this->doPing($addQuery, $debugClient);

            return true;
        } catch (ClientException $e) {
            // Thrown for 400 level errors
            $this->messages[] = Trans::__(
                'page.extend.error-message-client',
                ['%errormessage%' => $e->getMessage()]
            );
        } catch (ServerException $e) {
            // Thrown for 500 level errors
            $this->messages[] = Trans::__(
                'page.extend.error-message-server',
                ['%errormessage%' => $e->getMessage()]
            );
        } catch (RequestException $e) {
            // Thrown for connection timeout, DNS errors, etc
            $this->messages[] = Trans::__(
                'page.extend.error-message-connection',
                ['%errormessage%' => $e->getMessage()]
            );
        } catch (\Exception $e) {
            // Catch all
            $this->messages[] = Trans::__(
                'page.extend.error-message-generic',
                ['%errormessage%' => $e->getMessage()]
            );
        }

        return false;
    }
public function ping ( $ addQuery = false , $ debugClient = false ) { try { $ this -> doPing ( $ addQuery , $ debugClient ) ; return true ; } catch ( ClientException $ e ) { // Thrown for 400 level errors $ this -> messages [ ] = Trans :: __ ( 'page.extend.error-message-client' , [ '%errormessage%' => $ e -> getMessage ( ) ] ) ; } catch ( ServerException $ e ) { // Thrown for 500 level errors $ this -> messages [ ] = Trans :: __ ( 'page.extend.error-message-server' , [ '%errormessage%' => $ e -> getMessage ( ) ] ) ; } catch ( RequestException $ e ) { // Thrown for connection timeout, DNS errors, etc $ this -> messages [ ] = Trans :: __ ( 'page.extend.error-message-connection' , [ '%errormessage%' => $ e -> getMessage ( ) ] ) ; } catch ( \ Exception $ e ) { // Catch all $ this -> messages [ ] = Trans :: __ ( 'page.extend.error-message-generic' , [ '%errormessage%' => $ e -> getMessage ( ) ] ) ; } return false ; }
Ping site to see if we have a valid connection and it is responding correctly.

@param bool $addQuery
Ping site to see if we have a valid connection and it is responding correctly .