You are here

public static function AcquiaLiftAPI::isSuccessful in Acquia Lift Connector 7

Same name and namespace in other branches
  1. 7.2 includes/AcquiaLiftAPI.inc \AcquiaLiftAPI::isSuccessful()

Whether the passed in status code represents a successful response.

Parameters

$code: The status code.

Return value

bool TRUE if the code represents a client error, FALSE otherwise.

2 calls to AcquiaLiftAPI::isSuccessful()
AcquiaLiftAPI::handleBadResponse in includes/acquia_lift.classes.inc
Figures out the correct exception to throw and throws it.
AcquiaLiftAPI::mapBadResponseToExceptionClass in includes/acquia_lift.classes.inc
Maps the passed in response code to an exception class to use.

File

includes/acquia_lift.classes.inc, line 183
Provides an agent type for Acquia Lift

Class

AcquiaLiftAPI
@file Provides an agent type for Acquia Lift

Code

public static function isSuccessful($code) {
  return $code >= 200 && $code < 300;
}