public static function AcquiaLiftAPI::isSuccessful in Acquia Lift Connector 7.2
Same name and namespace in other branches
- 7 includes/acquia_lift.classes.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/
AcquiaLiftAPI.inc - Figures out the correct exception to throw and throws it.
- AcquiaLiftAPI::mapBadResponseToExceptionClass in includes/
AcquiaLiftAPI.inc - Maps the passed in response code to an exception class to use.
File
- includes/
AcquiaLiftAPI.inc, line 80
Class
Code
public static function isSuccessful($code) {
return $code >= 200 && $code < 300;
}