MediaWiki
1.34.0
|
Example handler @unstable. More...
Public Member Functions | |
getParamSettings () | |
Fetch ParamValidator settings for parameters. More... | |
needsWriteAccess () | |
Indicates whether this route requires write access. More... | |
run ( $name) | |
Public Member Functions inherited from MediaWiki\Rest\SimpleHandler | |
execute () | |
Execute the handler. More... | |
Public Member Functions inherited from MediaWiki\Rest\Handler | |
getBodyValidator ( $contentType) | |
Fetch the BodyValidator. More... | |
getConfig () | |
Get the configuration array for the current route. More... | |
getRequest () | |
Get the current request. More... | |
getResponseFactory () | |
Get the ResponseFactory which can be used to generate Response objects. More... | |
getValidatedBody () | |
Fetch the validated body. More... | |
getValidatedParams () | |
Fetch the validated parameters. More... | |
init (Router $router, RequestInterface $request, array $config, ResponseFactory $responseFactory) | |
Initialise with dependencies from the Router. More... | |
needsReadAccess () | |
Indicates whether this route requires read rights. More... | |
validate (Validator $restValidator) | |
Validate the request parameters/attributes and body. More... | |
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. More... | |
Protected Member Functions inherited from MediaWiki\Rest\Handler | |
getETag () | |
The subclass should override this to provide an ETag for the current request. More... | |
getLastModified () | |
The subclass should override this to provide the maximum last modified timestamp for the current request. More... | |
getRouter () | |
Get the Router. More... | |
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.