26use InvalidArgumentException;
67 parent::__construct(
$title, $user, $comment, $row, $slots, $dbDomain );
68 $this->mCallback = $callback;
77 if ( $this->mCallback ) {
80 return parent::getVisibility();
91 public function getUser( $audience = self::FOR_PUBLIC,
User $user =
null ) {
92 if ( $this->mCallback ) {
95 return parent::getUser( $audience, $user );
104 $freshRow = call_user_func( $this->mCallback, $this->mId );
108 $this->mCallback =
null;
111 $this->mDeleted = intval( $freshRow->rev_deleted );
115 $freshRow->rev_user ??
null,
116 $freshRow->rev_user_text ??
null,
117 $freshRow->rev_actor ??
null
119 }
catch ( InvalidArgumentException $ex ) {
123 . $this->mTitle->getPrefixedDBkey()
131 'Unable to load fresh row for rev_id: ' . $this->mId
wfWarn( $msg, $callerOffset=1, $level=E_USER_NOTICE)
Send a warning either to the debug log or in a PHP error depending on $wgDevelopmentWarnings.
Represents a title within MediaWiki.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
static newFromAnyId( $userId, $userName, $actorId, $dbDomain=false)
Static factory method for creation from an ID, name, and/or actor ID.