Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\RestApi\RouteHandlers\Middleware\RequestPreconditionCheckResult Class Reference

Public Member Functions

 getRevisionId ()
 Guaranteed to return a revision ID if the request headers match the latest revision, e.g.
 
 getStatusCode ()
 Returns the status code if the request headers match the latest revision, e.g.
 

Static Public Member Functions

static newConditionMetResult (int $revisionId, int $statusCode)
 
static newConditionUnmetResult ()
 

Private Member Functions

 __construct (?int $revisionId, ?int $statusCode)
 

Private Attributes

int $revisionId
 
int $statusCode
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\RestApi\RouteHandlers\Middleware\RequestPreconditionCheckResult::__construct ( ?int $revisionId,
?int $statusCode )
private

Member Function Documentation

◆ getRevisionId()

Wikibase\Repo\RestApi\RouteHandlers\Middleware\RequestPreconditionCheckResult::getRevisionId ( )

Guaranteed to return a revision ID if the request headers match the latest revision, e.g.

when sending an If-None-Match header containing the latest revision ID. Returns null if there was no match.

◆ getStatusCode()

Wikibase\Repo\RestApi\RouteHandlers\Middleware\RequestPreconditionCheckResult::getStatusCode ( )

Returns the status code if the request headers match the latest revision, e.g.

304 when sending an If-None-Match header containing the latest revision ID. Returns null if there was no match.

◆ newConditionMetResult()

static Wikibase\Repo\RestApi\RouteHandlers\Middleware\RequestPreconditionCheckResult::newConditionMetResult ( int $revisionId,
int $statusCode )
static

◆ newConditionUnmetResult()

static Wikibase\Repo\RestApi\RouteHandlers\Middleware\RequestPreconditionCheckResult::newConditionUnmetResult ( )
static

Member Data Documentation

◆ $revisionId

int Wikibase\Repo\RestApi\RouteHandlers\Middleware\RequestPreconditionCheckResult::$revisionId
private

◆ $statusCode

int Wikibase\Repo\RestApi\RouteHandlers\Middleware\RequestPreconditionCheckResult::$statusCode
private

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