MediaWiki REL1_34
|
Example handler @unstable. More...
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. | |
Example handler @unstable.
Definition at line 12 of file HelloHandler.php.
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.
Reimplemented from MediaWiki\Rest\Handler.
Definition at line 21 of file HelloHandler.php.
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.
Reimplemented from MediaWiki\Rest\Handler.
Definition at line 17 of file HelloHandler.php.
MediaWiki\Rest\Handler\HelloHandler::run | ( | $name | ) |
Definition at line 13 of file HelloHandler.php.