MediaWiki  master
MediaWiki\Rest\Handler\UserContributionsHandler Class Reference
Inheritance diagram for MediaWiki\Rest\Handler\UserContributionsHandler:
Collaboration diagram for MediaWiki\Rest\Handler\UserContributionsHandler:

Public Member Functions

 execute ()
 
 getParamSettings ()
 Fetch ParamValidator settings for parameters. More...
 
- Public Member Functions inherited from MediaWiki\Rest\Handler\AbstractContributionHandler
 __construct (ContributionsLookup $contributionsLookup, UserNameUtils $userNameUtils)
 
- Public Member Functions inherited from MediaWiki\Rest\Handler
 applyConditionalResponseHeaders (ResponseInterface $response)
 Modify the response, adding Last-Modified and ETag headers as indicated the values previously returned by ETag and getLastModified(). More...
 
 checkPreconditions ()
 Check the conditional request headers and generate a response if appropriate. More...
 
 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, HookContainer $hookContainer)
 Initialise with dependencies from the Router. More...
 
 needsReadAccess ()
 Indicates whether this route requires read rights. More...
 
 needsWriteAccess ()
 Indicates whether this route requires write access. More...
 
 validate (Validator $restValidator)
 Validate the request parameters/attributes and body. More...
 

Private Member Functions

 constructURLs (ContributionsSegment $segment)
 
 getContributionsList (ContributionsSegment $segment)
 Returns list of revisions. 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\AbstractContributionHandler
 getTargetUser ()
 Returns the user who's contributions we are requesting. More...
 
 postInitSetup ()
 The handler can override this to do any necessary setup after init() is called to inject the dependencies. More...
 
- Protected Member Functions inherited from MediaWiki\Rest\Handler
 getConditionalHeaderUtil ()
 Get a ConditionalHeaderUtil object. More...
 
 getETag ()
 The subclass should override this to provide an ETag for the current request. More...
 
 getHookContainer ()
 Get a HookContainer, for running extension hooks or for hook metadata. More...
 
 getHookRunner ()
 Get a HookRunner for running core hooks. More...
 
 getLastModified ()
 The subclass should override this to provide the maximum last modified timestamp for the current request. More...
 
 getRouter ()
 Get the Router. More...
 
 getRouteUrl ( $pathParams=[], $queryParams=[])
 Get the URL of this handler's endpoint. More...
 
 hasRepresentation ()
 The subclass should override this to indicate whether the resource exists. More...
 
 urlEncodeTitle ( $title)
 URL-encode titles in a "pretty" way. More...
 
- Protected Attributes inherited from MediaWiki\Rest\Handler\AbstractContributionHandler
ContributionsLookup $contributionsLookup
 
bool $me
 User is requesting their own contributions. More...
 
UserNameUtils $userNameUtils
 
const MAX_LIMIT = 20
 Hard limit results to 20 contributions. More...
 

Detailed Description

Since
1.35

Definition at line 18 of file UserContributionsHandler.php.

Member Function Documentation

◆ constructURLs()

MediaWiki\Rest\Handler\UserContributionsHandler::constructURLs ( ContributionsSegment  $segment)
private

◆ execute()

◆ getContributionsList()

MediaWiki\Rest\Handler\UserContributionsHandler::getContributionsList ( ContributionsSegment  $segment)
private

◆ getParamSettings()

MediaWiki\Rest\Handler\UserContributionsHandler::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.

Stable to override

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

Reimplemented from MediaWiki\Rest\Handler.

Definition at line 103 of file UserContributionsHandler.php.

References MediaWiki\Rest\Handler\AbstractContributionHandler\MAX_LIMIT.


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