body, 'errors')) $error = Error::createFromResponse($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; } }