function Services_JSON::isError in Video 7
@todo Ultimately, this should just call PEAR::isError()
2 calls to Services_JSON::isError()
- Services_JSON::encode in modules/
video_zencoder/ includes/ lib/ JSON.php - encodes an arbitrary variable into JSON format
- Services_JSON::name_value in modules/
video_zencoder/ includes/ lib/ JSON.php - array-walking function for use in generating JSON-formatted name-value pairs
File
- modules/
video_zencoder/ includes/ lib/ JSON.php, line 765
Class
- Services_JSON
- Converts to and from JSON format.
Code
function isError($data, $code = null) {
if (class_exists('pear')) {
return PEAR::isError($data, $code);
}
elseif (is_object($data) && (get_class($data) == 'services_json_error' || is_subclass_of($data, 'services_json_error'))) {
return true;
}
return false;
}