MediaWiki REL1_34
MediaWiki\Rest\Handler\HelloHandler Class Reference

Example handler @unstable. More...

Inheritance diagram for MediaWiki\Rest\Handler\HelloHandler:
Collaboration diagram for MediaWiki\Rest\Handler\HelloHandler:

Public Member Functions

 getParamSettings ()
 Fetch ParamValidator settings for parameters.
 
 needsWriteAccess ()
 Indicates whether this route requires write access.
 
 run ( $name)
 
- Public Member Functions inherited from MediaWiki\Rest\SimpleHandler
 execute ()
 Execute the handler.
 
- Public Member Functions inherited from MediaWiki\Rest\Handler
 getBodyValidator ( $contentType)
 Fetch the BodyValidator.
 
 getConfig ()
 Get the configuration array for the current route.
 
 getRequest ()
 Get the current request.
 
 getResponseFactory ()
 Get the ResponseFactory which can be used to generate Response objects.
 
 getValidatedBody ()
 Fetch the validated body.
 
 getValidatedParams ()
 Fetch the validated parameters.
 
 init (Router $router, RequestInterface $request, array $config, ResponseFactory $responseFactory)
 Initialise with dependencies from the Router.
 
 needsReadAccess ()
 Indicates whether this route requires read rights.
 
 validate (Validator $restValidator)
 Validate the request parameters/attributes and body.
 

Additional Inherited Members

- Public Attributes inherited from MediaWiki\Rest\Handler
const PARAM_SOURCE = 'rest-param-source'
 (string) ParamValidator constant to specify the source of the parameter.
 
- Protected Member Functions inherited from MediaWiki\Rest\Handler
 getETag ()
 The subclass should override this to provide an ETag for the current request.
 
 getLastModified ()
 The subclass should override this to provide the maximum last modified timestamp for the current request.
 
 getRouter ()
 Get the Router.
 

Detailed Description

Example handler @unstable.

Definition at line 12 of file HelloHandler.php.

Member Function Documentation

◆ getParamSettings()

MediaWiki\Rest\Handler\HelloHandler::getParamSettings ( )

Fetch ParamValidator settings for parameters.

Every setting must include self::PARAM_SOURCE to specify which part of the request is to contain the parameter.

Returns
array[] Associative array mapping parameter names to ParamValidator settings arrays

Reimplemented from MediaWiki\Rest\Handler.

Definition at line 21 of file HelloHandler.php.

◆ needsWriteAccess()

MediaWiki\Rest\Handler\HelloHandler::needsWriteAccess ( )

Indicates whether this route requires write access.

The handler should override this if the route does not need to write to the database.

This should return true for routes that may require synchronous database writes. Modules that do not need such writes should also not rely on master database access, since only read queries are needed and each master DB is a single point of failure.

Returns
bool

Reimplemented from MediaWiki\Rest\Handler.

Definition at line 17 of file HelloHandler.php.

◆ run()

MediaWiki\Rest\Handler\HelloHandler::run (   $name)

Definition at line 13 of file HelloHandler.php.


The documentation for this class was generated from the following file: