Merge "Provide command to adjust phpunit.xml for code coverage"
[lhc/web/wiklou.git] / includes / Rest / Handler / HelloHandler.php
index 6e119dd..495b101 100644 (file)
@@ -2,6 +2,7 @@
 
 namespace MediaWiki\Rest\Handler;
 
+use Wikimedia\ParamValidator\ParamValidator;
 use MediaWiki\Rest\SimpleHandler;
 
 /**
@@ -12,4 +13,18 @@ class HelloHandler extends SimpleHandler {
        public function run( $name ) {
                return [ 'message' => "Hello, $name!" ];
        }
+
+       public function needsWriteAccess() {
+               return false;
+       }
+
+       public function getParamSettings() {
+               return [
+                       'name' => [
+                               self::PARAM_SOURCE => 'path',
+                               ParamValidator::PARAM_TYPE => 'string',
+                               ParamValidator::PARAM_REQUIRED => true,
+                       ],
+               ];
+       }
 }