Page MenuHomeWickedGov Phorge

NotificationEnvelope.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

NotificationEnvelope.php

<?php
namespace MediaWiki\Notification;
/**
* An object representing notification with list of recipients
* @since 1.44
* @unstable
*/
class NotificationEnvelope {
private Notification $notification;
private RecipientSet $recipientSet;
public function __construct( Notification $notification, RecipientSet $recipientSet ) {
$this->notification = $notification;
$this->recipientSet = $recipientSet;
}
public function getNotification(): Notification {
return $this->notification;
}
public function getRecipientSet(): RecipientSet {
return $this->recipientSet;
}
/**
* Syntax sugar, allows easy check if two envelopes point to the same thing
*/
public function equals( NotificationEnvelope $envelope ): bool {
return $envelope === $this;
}
/**
* Check if the Notification has defined agent.
*
* Utility method for a very common check where middleware filters Notifications from
* specific agent.
*/
public function hasAgent(): bool {
return $this->notification instanceof AgentAware;
}
}

File Metadata

Mime Type
text/x-php
Expires
Oct 5 2026, 06:13 (8 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
73/0d/cace17bd691324bac21be7d8fafe
Default Alt Text
NotificationEnvelope.php (1 KB)

Event Timeline