MediaWiki REL1_37
MediaWiki\Revision\ContributionsSegment Class Reference

@newable More...

Collaboration diagram for MediaWiki\Revision\ContributionsSegment:

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.
 

Private Attributes

string null $after
 
string null $before
 
array $deltas
 
array $flags
 
RevisionRecord[] $revisions
 
string[][] $tags
 

Detailed Description

@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.

References MediaWiki\Revision\ContributionsSegment\$after, MediaWiki\Revision\ContributionsSegment\$before, MediaWiki\Revision\ContributionsSegment\$deltas, MediaWiki\Revision\ContributionsSegment\$flags, MediaWiki\Revision\ContributionsSegment\$revisions, and MediaWiki\Revision\ContributionsSegment\$tags.

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.

Referenced by MediaWiki\Rest\Handler\UserContributionsHandler\getContributionsList().

◆ 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.

Referenced by MediaWiki\Rest\Handler\UserContributionsHandler\getContributionsList().

◆ 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.

Member Data Documentation

◆ $after

string null MediaWiki\Revision\ContributionsSegment::$after
private

◆ $before

string null MediaWiki\Revision\ContributionsSegment::$before
private

◆ $deltas

array MediaWiki\Revision\ContributionsSegment::$deltas
private

◆ $flags

array MediaWiki\Revision\ContributionsSegment::$flags
private

◆ $revisions

RevisionRecord [] MediaWiki\Revision\ContributionsSegment::$revisions
private

◆ $tags

string [][] MediaWiki\Revision\ContributionsSegment::$tags
private

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