diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-12-17 09:15:42 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-12-17 09:44:51 +0100 |
commit | a1789ddde42033f1b05cc4929491214ee6e79383 (patch) | |
tree | 63615735c4ddffaaabf2428946bb26f90899f7bf /includes/libs/virtualrest/VirtualRESTService.php | |
parent | 9e06a62f265e3a2aaabecc598d4bc617e06fa32d (diff) |
Update to MediaWiki 1.26.0
Diffstat (limited to 'includes/libs/virtualrest/VirtualRESTService.php')
-rw-r--r-- | includes/libs/virtualrest/VirtualRESTService.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/includes/libs/virtualrest/VirtualRESTService.php b/includes/libs/virtualrest/VirtualRESTService.php index 05c2afc1..01a4ea6e 100644 --- a/includes/libs/virtualrest/VirtualRESTService.php +++ b/includes/libs/virtualrest/VirtualRESTService.php @@ -45,6 +45,17 @@ abstract class VirtualRESTService { } /** + * Return the name of this service, in a form suitable for error + * reporting or debugging. + * + * @return string The name of the service behind this VRS object. + */ + public function getName() { + return isset( $this->params['name'] ) ? $this->params['name'] : + get_class( $this ); + } + + /** * Prepare virtual HTTP(S) requests (for this service) for execution * * This method should mangle any of the $reqs entry fields as needed: @@ -84,8 +95,8 @@ abstract class VirtualRESTService { * * This method may mangle any of the $reqs entry 'response' fields as needed: * - code : perform any code normalization [as needed] - * - reason : perform any reason normalization [as needed] - * - headers : perform any header normalization [as needed] + * - reason : perform any reason normalization [as needed] + * - headers : perform any header normalization [as needed] * * This method can also remove some of the requests as well as add new ones * (using $idGenerator to set each of the entries' array keys). For any existing |