apps/files_external/3rdparty/icewind/smb/src/Parser.php
/**
	 * check if the first line holds a connection failure
	 *
	 * @param $line
	 * @throws AuthenticationException
	 * @throws InvalidHostException
	 * @throws NoLoginServerException
	 */
check if the first line holds a connection failure
@param $line
@throws AuthenticationException
@throws InvalidHostException
@throws NoLoginServerException
check if the first line holds a connection failure @param $line @throws AuthenticationException @throws InvalidHostException @throws NoLoginServerException
public function checkConnectionError($line) {
		$line = rtrim($line, ')');
		if (substr($line, -23) === ErrorCodes::LogonFailure) {
			throw new AuthenticationException('Invalid login');
		}
		if (substr($line, -26) === ErrorCodes::BadHostName) {
			throw new InvalidHostException('Invalid hostname');
		}
		if (substr($line, -22) === ErrorCodes::Unsuccessful) {
			throw new InvalidHostException('Connection unsuccessful');
		}
		if (substr($line, -28) === ErrorCodes::ConnectionRefused) {
			throw new InvalidHostException('Connection refused');
		}
		if (substr($line, -26) === ErrorCodes::NoLogonServers) {
			throw new NoLoginServerException('No login server');
		}
	}
public function checkConnectionError ( $ line ) { $ line = rtrim ( $ line , ')' ) ; if ( substr ( $ line , - 23 ) === ErrorCodes :: LogonFailure ) { throw new AuthenticationException ( 'Invalid login' ) ; } if ( substr ( $ line , - 26 ) === ErrorCodes :: BadHostName ) { throw new InvalidHostException ( 'Invalid hostname' ) ; } if ( substr ( $ line , - 22 ) === ErrorCodes :: Unsuccessful ) { throw new InvalidHostException ( 'Connection unsuccessful' ) ; } if ( substr ( $ line , - 28 ) === ErrorCodes :: ConnectionRefused ) { throw new InvalidHostException ( 'Connection refused' ) ; } if ( substr ( $ line , - 26 ) === ErrorCodes :: NoLogonServers ) { throw new NoLoginServerException ( 'No login server' ) ; } }
check if the first line holds a connection failure
 @param $line
 @throws AuthenticationException
 @throws InvalidHostException
 @throws NoLoginServerException
check if the first line holds a connection failure @param $line @throws AuthenticationException @throws InvalidHostException @throws NoLoginServerException