67 parent::__construct( $page, $user, $comment, $row, $slots, $wikiID );
68 $this->mCallback = $callback;
77 if ( $this->mCallback ) {
78 $this->loadFreshRow();
80 return parent::getVisibility();
91 public function getUser( $audience = self::FOR_PUBLIC, ?
Authority $performer =
null ) {
92 if ( $this->mCallback ) {
93 $this->loadFreshRow();
95 return parent::getUser( $audience, $performer );
103 private function loadFreshRow() {
104 [ $freshRevDeleted, $freshUser ] = call_user_func( $this->mCallback, $this->mId );
108 $this->mCallback =
null;
110 if ( $freshRevDeleted !==
null && $freshUser !==
null ) {
111 $this->mDeleted = intval( $freshRevDeleted );
112 $this->mUser = $freshUser;
114 throw new RevisionAccessException(
115 'Unable to load fresh row for rev_id: {rev_id}',
116 [
'rev_id' => $this->mId ]
Interface for objects (potentially) representing an editable wiki page.