revisions = $revisions; $this->tags = $tags; $this->before = $before; $this->after = $after; $this->deltas = $deltas; $this->flags = $flags; } /** * Returns an associative array mapping revision IDs to lists of tag names. * * @param int $revId a revision ID * * @return string[] */ public function getTagsForRevision( $revId ): array { return $this->tags[$revId] ?? []; } /** * @return RevisionRecord[] */ public function getRevisions(): array { return $this->revisions; } /** * @return string|null */ public function getBefore(): ?string { return $this->before; } /** * @return string|null */ public function getAfter(): ?string { return $this->after; } /** * Returns the difference in size of the given revision and its parent revision. * Returns null if the size difference is unknown. * @param int $revid Revision id * @return int|null */ public function getDeltaForRevision( int $revid ): ?int { return $this->deltas[$revid] ?? null; } /** * The value of the 'newest' field of the flags passed to the constructor, or false * if that field was not set. * * @return bool */ public function isNewest() { return $this->flags['newest'] ?? false; } /** * The value of the 'oldest' field of the flags passed to the constructor, or false * if that field was not set. * * @return bool */ public function isOldest() { return $this->flags['oldest'] ?? false; } }