public function isAvailable()
    {
        try {
            /** @var Response $result */
            $result = $this->get('/', $this->getGuzzleOptions());

            if ($result->getStatusCode() == 200) {
                return true;
            }
        } catch (RequestException $ex) {
            $msg = sprintf("Tika unavailable - %s", $ex->getMessage());
            Injector::inst()->get(LoggerInterface::class)->info($msg);

            return false;
        }
    }
public function isAvailable()
    {
        try {
            /** @var Response $result */
            $result = $this->get('/', $this->getGuzzleOptions());

            if ($result->getStatusCode() == 200) {
                return true;
            }
        } catch (RequestException $ex) {
            $msg = sprintf("Tika unavailable - %s", $ex->getMessage());
            Injector::inst()->get(LoggerInterface::class)->info($msg);

            return false;
        }
    }
public function isAvailable ( ) { try { /** @var Response $result */ $ result = $ this -> get ( '/' , $ this -> getGuzzleOptions ( ) ) ; if ( $ result -> getStatusCode ( ) == 200 ) { return true ; } } catch ( RequestException $ ex ) { $ msg = sprintf ( "Tika unavailable - %s" , $ ex -> getMessage ( ) ) ; Injector :: inst ( ) -> get ( LoggerInterface :: class ) -> info ( $ msg ) ; return false ; } }
Detect if the service is available

@return bool
Detect if the service is available