mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-12-22 04:46:27 +00:00
880f9755e0
Rename ThreadItem to ContentThreadItem, then create a new ThreadItem interface containing only the methods that we'll be able to implement using only the persistently stored data (no parsing), then create a DatabaseThreadItem. Do the same for CommentItem and HeadingItem. ThreadItemSet gets a similar treatment, but it's basically only for Phan's type checking. (This is sad.) Change-Id: I1633049befe8ec169753b82eb876459af1f63fe8
23 lines
442 B
PHP
23 lines
442 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools\ThreadItem;
|
|
|
|
use DateTimeImmutable;
|
|
|
|
interface CommentItem extends ThreadItem {
|
|
/**
|
|
* @return string Comment author
|
|
*/
|
|
public function getAuthor(): string;
|
|
|
|
/**
|
|
* @return DateTimeImmutable Comment timestamp
|
|
*/
|
|
public function getTimestamp(): DateTimeImmutable;
|
|
|
|
/**
|
|
* @return string Comment timestamp in standard format
|
|
*/
|
|
public function getTimestampString(): string;
|
|
}
|