Merge "Don't check namespace in SpecialWantedtemplates"
[lhc/web/wiklou.git] / includes / libs / virtualrest / VirtualRESTService.php
index 2a0b3f0..01a4ea6 100644 (file)
@@ -44,6 +44,17 @@ abstract class VirtualRESTService {
                $this->params = $params;
        }
 
+       /**
+        * 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
         *