Merge "Add .pipeline/ with dev image variant"
[lhc/web/wiklou.git] / includes / Rest / Handler / HelloHandler.php
1 <?php
2
3 namespace MediaWiki\Rest\Handler;
4
5 use Wikimedia\ParamValidator\ParamValidator;
6 use MediaWiki\Rest\SimpleHandler;
7
8 /**
9 * Example handler
10 * @unstable
11 */
12 class HelloHandler extends SimpleHandler {
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 }