MediaWiki REL1_35
|
Public Member Functions | |
__construct (ContributionsLookup $contributionsLookup, UserFactory $userFactory, UserNameUtils $userNameUtils) | |
execute () | |
getParamSettings () | |
Fetch ParamValidator settings for parameters. | |
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(). | |
checkPreconditions () | |
Check the conditional request headers and generate a response if appropriate. | |
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, HookContainer $hookContainer) | |
Initialise with dependencies from the Router. | |
needsReadAccess () | |
Indicates whether this route requires read rights. | |
needsWriteAccess () | |
Indicates whether this route requires write access. | |
validate (Validator $restValidator) | |
Validate the request parameters/attributes and body. | |
Protected Member Functions | |
postInitSetup () | |
The handler can override this to do any necessary setup after init() is called to inject the dependencies. | |
Protected Member Functions inherited from MediaWiki\Rest\Handler | |
getConditionalHeaderUtil () | |
Get a ConditionalHeaderUtil object. | |
getETag () | |
The subclass should override this to provide an ETag for the current request. | |
getHookContainer () | |
Get a HookContainer, for running extension hooks or for hook metadata. | |
getHookRunner () | |
Get a HookRunner for running core hooks. | |
getLastModified () | |
The subclass should override this to provide the maximum last modified timestamp for the current request. | |
getRouter () | |
Get the Router. | |
getRouteUrl ( $pathParams=[], $queryParams=[]) | |
Get the URL of this handler's endpoint. | |
hasRepresentation () | |
The subclass should override this to indicate whether the resource exists. | |
urlEncodeTitle ( $title) | |
URL-encode titles in a "pretty" way. | |
Private Member Functions | |
constructURLs (ContributionsSegment $segment) | |
getRevisionsList (ContributionsSegment $segment) | |
Returns list of revisions. | |
getTargetUser () | |
Returns the user who's contributions we are requesting. | |
Private Attributes | |
ContributionsLookup | $contributionsLookup |
bool | $me |
User is requesting their own contributions. | |
UserFactory | $userFactory |
UserNameUtils | $userNameUtils |
const | MAX_LIMIT = 20 |
Hard limit results to 20 revisions. | |
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. | |
Definition at line 23 of file UserContributionsHandler.php.
MediaWiki\Rest\Handler\UserContributionsHandler::__construct | ( | ContributionsLookup | $contributionsLookup, |
UserFactory | $userFactory, | ||
UserNameUtils | $userNameUtils | ||
) |
ContributionsLookup | $contributionsLookup | |
UserFactory | $userFactory | |
UserNameUtils | $userNameUtils |
Definition at line 53 of file UserContributionsHandler.php.
References MediaWiki\Rest\Handler\UserContributionsHandler\$contributionsLookup, MediaWiki\Rest\Handler\UserContributionsHandler\$userFactory, and MediaWiki\Rest\Handler\UserContributionsHandler\$userNameUtils.
|
private |
ContributionsSegment | $segment |
Definition at line 169 of file UserContributionsHandler.php.
References MediaWiki\Revision\ContributionsSegment\getAfter(), MediaWiki\Revision\ContributionsSegment\getBefore(), MediaWiki\Rest\Handler\getRouteUrl(), MediaWiki\Rest\Handler\getValidatedParams(), and MediaWiki\Revision\ContributionsSegment\isOldest().
Referenced by MediaWiki\Rest\Handler\UserContributionsHandler\execute().
MediaWiki\Rest\Handler\UserContributionsHandler::execute | ( | ) |
LocalizedHttpException |
Reimplemented from MediaWiki\Rest\Handler.
Definition at line 118 of file UserContributionsHandler.php.
References MediaWiki\Rest\Handler\UserContributionsHandler\constructURLs(), MediaWiki\Rest\Handler\UserContributionsHandler\getRevisionsList(), MediaWiki\Rest\Handler\UserContributionsHandler\getTargetUser(), and MediaWiki\Rest\Handler\getValidatedParams().
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
Reimplemented from MediaWiki\Rest\Handler.
Definition at line 188 of file UserContributionsHandler.php.
|
private |
Returns list of revisions.
ContributionsSegment | $segment |
Definition at line 143 of file UserContributionsHandler.php.
References MediaWiki\Revision\ContributionsSegment\getDeltaForRevision(), MediaWiki\Revision\ContributionsSegment\getTagsForRevision(), and wfTimestamp().
Referenced by MediaWiki\Rest\Handler\UserContributionsHandler\execute().
|
private |
Returns the user who's contributions we are requesting.
Either me (requesting user) or another user.
LocalizedHttpException |
Definition at line 74 of file UserContributionsHandler.php.
References MediaWiki\Rest\Handler\getValidatedParams().
Referenced by MediaWiki\Rest\Handler\UserContributionsHandler\execute().
|
protected |
The handler can override this to do any necessary setup after init() is called to inject the dependencies.
Stable to override
Reimplemented from MediaWiki\Rest\Handler.
Definition at line 63 of file UserContributionsHandler.php.
References MediaWiki\Rest\Handler\getConfig().
|
private |
Definition at line 28 of file UserContributionsHandler.php.
Referenced by MediaWiki\Rest\Handler\UserContributionsHandler\__construct().
|
private |
User is requesting their own contributions.
Definition at line 41 of file UserContributionsHandler.php.
|
private |
Definition at line 33 of file UserContributionsHandler.php.
Referenced by MediaWiki\Rest\Handler\UserContributionsHandler\__construct().
|
private |
Definition at line 46 of file UserContributionsHandler.php.
Referenced by MediaWiki\Rest\Handler\UserContributionsHandler\__construct().
|
private |
Hard limit results to 20 revisions.
Definition at line 36 of file UserContributionsHandler.php.