Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6069844
NotificationEnvelope.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
NotificationEnvelope.php
View Options
<?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
Details
Attached
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)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment