class ServicesClientErrorType in Services Client 7.2
Define error types.
Hierarchy
- class \ServicesClientErrorType
Expanded class hierarchy of ServicesClientErrorType
File
- include/
plugin.inc, line 143 - Base plugin definitions. All other plugins should be extended from this set of plugins.
View source
class ServicesClientErrorType {
/**
* Network error, like can't connect to other site.
*/
const NETWORK = 1;
const LOOP = 2;
const REMOTE_LOGIC = 3;
const REMOTE_SERVER = 4;
const UNKNOWN = 5;
/**
* Get list of all error types keyed by error type contstant and value is
* user readable name.
*
* @return array
*/
public static function getTypes() {
return array(
self::NETWORK => 'network',
self::LOOP => 'loop',
self::REMOTE_LOGIC => 'remote logic',
self::REMOTE_SERVER => 'remote server',
self::UNKNOWN => 'unknown',
);
}
/**
* Retrieve error type user readable name.
*
* @param int $type
* Type contstant value.
*
* @return string
* Name of error
*/
public static function getTypeName($type) {
$types = self::getTypes();
return isset($types[$type]) ? $types[$type] : NULL;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ServicesClientErrorType:: |
public static | function | Retrieve error type user readable name. | |
ServicesClientErrorType:: |
public static | function | Get list of all error types keyed by error type contstant and value is user readable name. | |
ServicesClientErrorType:: |
constant | |||
ServicesClientErrorType:: |
constant | Network error, like can't connect to other site. | ||
ServicesClientErrorType:: |
constant | |||
ServicesClientErrorType:: |
constant | |||
ServicesClientErrorType:: |
constant |