body, 'category_code') && array_key_exists($response->body->category_code, Error::$codes)) $error = new Error::$codes[$response->body->category_code]($response); else $error = new HTTPError($response); return $error; } public static function getClient() { $class = get_called_class(); return $class::$_client; } public static function getRegistry() { $class = get_called_class(); return $class::$_registry; } public static function getURISpec() { $class = get_called_class(); return $class::$_uri_spec; } }