MediaWiki REL1_35
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=[])
 ContributionsSegment constructor.
 
 getAfter ()
 
 getBefore ()
 
 getDeltaForRevision (int $revid)
 Returns the difference in size of the given revision and its parent revision.
 
 getRevisions ()
 
 getTagsForRevision ( $revId)
 Returns an associative array mapping revision IDs to lists of tag names.
 
 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 9 of file ContributionsSegment.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Revision\ContributionsSegment::__construct ( array  $revisions,
array  $tags,
?string  $before,
?string  $after,
array  $deltas = [],
array  $flags = [] 
)

ContributionsSegment constructor.

Parameters
RevisionRecord[]$revisions
string[][]$tagsAn associative array mapping revision IDs to lists of tag names.
string | null$before
string | null$after
array$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.

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

◆ getBefore()

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

Definition at line 91 of file ContributionsSegment.php.

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

◆ 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\getRevisionsList().

◆ getRevisions()

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

Definition at line 84 of file ContributionsSegment.php.

◆ getTagsForRevision()

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

Returns an associative array mapping revision IDs to lists of tag names.

Parameters
int$revIda revision ID
Returns
string[]

Definition at line 77 of file ContributionsSegment.php.

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

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

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

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: