MediaWiki  master
WatchedItem.php
Go to the documentation of this file.
1 <?php
24 
33 class WatchedItem {
37  private $linkTarget;
38 
42  private $user;
43 
48 
54  public function __construct(
58  ) {
59  $this->user = $user;
60  $this->linkTarget = $linkTarget;
61  $this->notificationTimestamp = $notificationTimestamp;
62  }
63 
68  public function getUser() {
69  return User::newFromIdentity( $this->user );
70  }
71 
75  public function getUserIdentity() {
76  return $this->user;
77  }
78 
82  public function getLinkTarget() {
83  return $this->linkTarget;
84  }
85 
91  public function getNotificationTimestamp() {
93  }
94 }
getNotificationTimestamp()
Get the notification timestamp of this entry.
Definition: WatchedItem.php:91
LinkTarget $linkTarget
Definition: WatchedItem.php:37
null string $notificationTimestamp
the value of the wl_notificationtimestamp field
Definition: WatchedItem.php:47
UserIdentity $user
Definition: WatchedItem.php:42
Interface for objects representing user identity.
Representation of a pair of user and title for watchlist entries.
Definition: WatchedItem.php:33
__construct(UserIdentity $user, LinkTarget $linkTarget, $notificationTimestamp)
Definition: WatchedItem.php:54
static newFromIdentity(UserIdentity $identity)
Returns a User object corresponding to the given UserIdentity.
Definition: User.php:571