public static function checkReconnectError($errorCode, $errorInfo, $exception) {
        if ($exception) {
            if (stripos($exception->getMessage(), self::MYSQL_GONE_AWAY) !== false || stripos($exception->getMessage(), self::MYSQL_REFUSED) !== false) {
                return true;
            }
        } elseif ($errorInfo) {
            if (stripos($errorInfo[2], self::MYSQL_GONE_AWAY) !== false || stripos($errorInfo[2], self::MYSQL_REFUSED) !== false) {
                return true;
            }
        }

        return false;
    }
public static function checkReconnectError($errorCode, $errorInfo, $exception) {
        if ($exception) {
            if (stripos($exception->getMessage(), self::MYSQL_GONE_AWAY) !== false || stripos($exception->getMessage(), self::MYSQL_REFUSED) !== false) {
                return true;
            }
        } elseif ($errorInfo) {
            if (stripos($errorInfo[2], self::MYSQL_GONE_AWAY) !== false || stripos($errorInfo[2], self::MYSQL_REFUSED) !== false) {
                return true;
            }
        }

        return false;
    }
public static function checkReconnectError ( $ errorCode , $ errorInfo , $ exception ) { if ( $ exception ) { if ( stripos ( $ exception -> getMessage ( ) , self :: MYSQL_GONE_AWAY ) !== false || stripos ( $ exception -> getMessage ( ) , self :: MYSQL_REFUSED ) !== false ) { return true ; } } elseif ( $ errorInfo ) { if ( stripos ( $ errorInfo [ 2 ] , self :: MYSQL_GONE_AWAY ) !== false || stripos ( $ errorInfo [ 2 ] , self :: MYSQL_REFUSED ) !== false ) { return true ; } } return false ; }
Check whether we need to reconnect database
@param  string|null $errorCode
@param  array|null $errorInfo
@param  \Exception|null $exception
@return boolean
Check whether we need to reconnect database