Go to the documentation of this file.
28 use 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 ) {
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()
127 $this->mUser =
new UserIdentityValue( 0,
'Unknown user', 0 );
131 'Unable to load fresh row for rev_id: ' . $this->mId
static newFromAnyId( $userId, $userName, $actorId, $dbDomain=false)
Static factory method for creation from an ID, name, and/or actor ID.
Represents a title within MediaWiki.
wfWarn( $msg, $callerOffset=1, $level=E_USER_NOTICE)
Send a warning either to the debug log or in a PHP error depending on $wgDevelopmentWarnings.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...