MediaWiki REL1_40
MediaWiki\Parser\Parsoid\ParsoidRenderID Class Reference

Represents the identity of a specific rendering of a specific revision at some point in time. More...

Public Member Functions

 __construct (int $revisionID, string $uniqueID)
 
 __toString ()
 
 getKey ()
 This returns the canonical string representation from the parsoid render ID which can be used to in newFromString().
 
 getRevisionID ()
 Get the revision ID from the parsoid render ID object.
 
 getUniqueID ()
 Get the unique identifier from the parsoid render ID object.
 

Static Public Member Functions

static newFromETag (string $eTag)
 This constructs a new render ID from the given ETag.
 
static newFromKey (string $key)
 

Detailed Description

Represents the identity of a specific rendering of a specific revision at some point in time.

Since
1.39
Stability: unstable
since 1.39, should be stable by 1.39 release.

Definition at line 14 of file ParsoidRenderID.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Parser\Parsoid\ParsoidRenderID::__construct ( int $revisionID,
string $uniqueID )
Parameters
int$revisionIDRevision that was rendered
string$uniqueIDAn identifier for a point in time.

Definition at line 29 of file ParsoidRenderID.php.

Member Function Documentation

◆ __toString()

MediaWiki\Parser\Parsoid\ParsoidRenderID::__toString ( )

Definition at line 88 of file ParsoidRenderID.php.

◆ getKey()

MediaWiki\Parser\Parsoid\ParsoidRenderID::getKey ( )

This returns the canonical string representation from the parsoid render ID which can be used to in newFromString().

Returns
string

Definition at line 84 of file ParsoidRenderID.php.

◆ getRevisionID()

MediaWiki\Parser\Parsoid\ParsoidRenderID::getRevisionID ( )

Get the revision ID from the parsoid render ID object.

Returns
int

Definition at line 97 of file ParsoidRenderID.php.

◆ getUniqueID()

MediaWiki\Parser\Parsoid\ParsoidRenderID::getUniqueID ( )

Get the unique identifier from the parsoid render ID object.

Returns
string

Definition at line 106 of file ParsoidRenderID.php.

◆ newFromETag()

static MediaWiki\Parser\Parsoid\ParsoidRenderID::newFromETag ( string $eTag)
static

This constructs a new render ID from the given ETag.

Any suffix after a second forward slash will be ignored e.g. ->newFromEtag( '1/abc/stash' ) will return '1/abc' when ->getKey() is called on the ParsoidRenderID object instance.

Parameters
string$eTagETag with double quotes, see https://www.rfc-editor.org/rfc/rfc7232#section-2.3
Returns
ParsoidRenderID|null The render ID embedded in the ETag, or null if the ETag was malformed.
See also
newFromKey() if ETag already has outside quotes trimmed

Definition at line 68 of file ParsoidRenderID.php.

◆ newFromKey()

static MediaWiki\Parser\Parsoid\ParsoidRenderID::newFromKey ( string $key)
static
Parameters
string$keyString representation of render ID (synonymous with an etag with double quotes) as returned by ::getKey().
Returns
self
See also
newFromETag()

Definition at line 43 of file ParsoidRenderID.php.


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