MMOframework
Pourquoi l'IA Playground Bibliothèques Documentation Rechercher Agence
FR EN
Index

NotificationSent

MMO\client\events · 1 symbole · générée le 27 Oct 2026

class

NotificationSent

NotificationSent.php:12

A notification was given to its recipients (Notifications::send): another channel -- an email, a webhook to a team's chat -- listens to this one.

class MMO\client\events\NotificationSent extends MMO\core\events\Event
Espace de noms
MMO\client\events
Étend
Event
NotificationSent::AddListener(fn(NotificationSent $e) => postToChat($e->notification['title']));

Propriétés2

notification

readonly
readonly array $notification
Type
array

recipients

readonly
readonly array $recipients
Type
array

Méthodes1

__construct($origin, $recipients, $notification)

NotificationSent.php:18
function __construct(object|string $origin, array $recipients, array $notification)
$originobject | string
$recipientsarray
$notificationarrayas the store kept it, but its id, which is each recipient's own
Membres hérités (12)
PropriétésDéclaré parDescription
ListenersEvent
originEvent
MéthodesDéclaré parDescription
AddListener($handler, $order)EventRegister a listener directly (as opposed to ConnectListeners's attribute-based discovery).
ConnectListeners($obj)EventScan $obj's methods for #[Listen(EventClass::class)] attributes and register each one as a listener on the matching event class.
DisconnectListeners($obj)EventUndo a previous ConnectListeners: removes every listener that connect had registered for $obj on this event class.
dispatch()EventInvoke every GetListeners listener with $this.
GetListeners()EventCollect every listener for this class, including those registered on its parent classes (so a subclass event is also caught by listeners of its parent event), sorted by ascending $order (ties keep …
getOrigin()Event
HasListener($handler)Event
RemoveListener($handler)EventRemove the last added handler from the listeners.
Send($args)EventConstruct a new instance of this class with $args, then dispatch it to every listener.
SetListenerOrder($handler, $order)EventChange the order of an already-registered listener, whether added directly via AddListener or indirectly via ConnectListeners (which also stores its [$obj, $methodName] callables here).