MediaWiki REL1_34
HelloHandler.php
Go to the documentation of this file.
1<?php
2
4
7
13 public function run( $name ) {
14 return [ 'message' => "Hello, $name!" ];
15 }
16
17 public function needsWriteAccess() {
18 return false;
19 }
20
21 public function getParamSettings() {
22 return [
23 'name' => [
24 self::PARAM_SOURCE => 'path',
25 ParamValidator::PARAM_TYPE => 'string',
26 ParamValidator::PARAM_REQUIRED => true,
27 ],
28 ];
29 }
30}
Example handler @unstable.
needsWriteAccess()
Indicates whether this route requires write access.
getParamSettings()
Fetch ParamValidator settings for parameters.
Service for formatting and validating API parameters.