MediaWiki REL1_39
MediaWiki\Revision\ContributionsSegment Class Reference

Public Member Functions

 __construct (array $revisions, array $tags, ?string $before, ?string $after, array $deltas=[], array $flags=[])
 
 getAfter ()
 
 getBefore ()
 
 getDeltaForRevision (int $revid)
 Returns the difference in size of the given revision and its parent revision.
 
 getRevisions ()
 
 getTagsForRevision ( $revId)
 Get tags and associated metadata for a given revision.
 
 isNewest ()
 The value of the 'newest' field of the flags passed to the constructor, or false if that field was not set.
 
 isOldest ()
 The value of the 'oldest' field of the flags passed to the constructor, or false if that field was not set.
 

Detailed Description

Stability: newable
Since
1.35

Definition at line 11 of file ContributionsSegment.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Revision\ContributionsSegment::__construct ( array $revisions,
array $tags,
?string $before,
?string $after,
array $deltas = [],
array $flags = [] )
Parameters
RevisionRecord[]$revisions
string[][]$tagsAssociative array mapping revision IDs to a map of tag names to Message objects
string | null$before
string | null$after
int[]$deltasAn associative array mapping a revision Id to the difference in size of this revision and its parent revision. Values may be null if the size difference is unknown.
array$flagsIs an associative array, known fields are:
  • newest: bool indicating whether this segment is the newest in time
  • oldest: bool indicating whether this segment is the oldest in time

Definition at line 54 of file ContributionsSegment.php.

Member Function Documentation

◆ getAfter()

MediaWiki\Revision\ContributionsSegment::getAfter ( )
Returns
string|null

Definition at line 98 of file ContributionsSegment.php.

◆ getBefore()

MediaWiki\Revision\ContributionsSegment::getBefore ( )
Returns
string|null

Definition at line 91 of file ContributionsSegment.php.

◆ getDeltaForRevision()

MediaWiki\Revision\ContributionsSegment::getDeltaForRevision ( int $revid)

Returns the difference in size of the given revision and its parent revision.

Returns null if the size difference is unknown.

Parameters
int$revidRevision id
Returns
int|null

Definition at line 108 of file ContributionsSegment.php.

◆ getRevisions()

MediaWiki\Revision\ContributionsSegment::getRevisions ( )
Returns
RevisionRecord[]

Definition at line 84 of file ContributionsSegment.php.

◆ getTagsForRevision()

MediaWiki\Revision\ContributionsSegment::getTagsForRevision ( $revId)

Get tags and associated metadata for a given revision.

Parameters
int$revIda revision ID
Returns
Message[] Associative array mapping tag name to a Message object storing tag display data

Definition at line 77 of file ContributionsSegment.php.

◆ isNewest()

MediaWiki\Revision\ContributionsSegment::isNewest ( )

The value of the 'newest' field of the flags passed to the constructor, or false if that field was not set.

Returns
bool

Definition at line 118 of file ContributionsSegment.php.

◆ isOldest()

MediaWiki\Revision\ContributionsSegment::isOldest ( )

The value of the 'oldest' field of the flags passed to the constructor, or false if that field was not set.

Returns
bool

Definition at line 128 of file ContributionsSegment.php.


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