protected function hasDatabaseConnection($host, $port = 3306, $seconds = 30)
    {
        $hostChecker = $this->getHostChecker();
        $hostChecker
            ->setHost($host)
            ->setPort($port);

        return $hostChecker->isPortOpenRepeater($seconds);
    }
protected function hasDatabaseConnection($host, $port = 3306, $seconds = 30)
    {
        $hostChecker = $this->getHostChecker();
        $hostChecker
            ->setHost($host)
            ->setPort($port);

        return $hostChecker->isPortOpenRepeater($seconds);
    }
protected function hasDatabaseConnection ( $ host , $ port = 3306 , $ seconds = 30 ) { $ hostChecker = $ this -> getHostChecker ( ) ; $ hostChecker -> setHost ( $ host ) -> setPort ( $ port ) ; return $ hostChecker -> isPortOpenRepeater ( $ seconds ) ; }
Check if host has database connection.

@param string $host
The database hostname.
@param int $port
The database port.
@param int $seconds
The amount of seconds to continually check.

@return bool
Return true if the database is connectible; otherwise false.
Check if host has database connection .