MMOframework
Why AI Playground Libraries Documentation Search Agency
FR EN
Index

ModesList

MMO\client\events · 1 symbol · generated 27 Oct 2026

class

ModesList

ModesList.php:14

Asks every library and the application the display modes they have (Mode): sent once, by

class MMO\client\events\ModesList extends MMO\core\events\SingleSignal
Namespace
MMO\client\events
Extends
SingleSignal
See
Modes, which declares the levels its configuration enables.
ModesList::AddListener(fn(ModesList $e) => $e->add(new Mode('dev', Mode::LAYER, 'Developer', 'code', scope: 'modes.dev')));

Index

add($mode)a mode of the same id replaces it: an application words a library's mode its own way
getModes()
__construct($origin)

Methods3

add($mode)

ModesList.php:21

a mode of the same id replaces it: an application words a library's mode its own way

function add(MMO\client\classes\Mode $mode): MMO\client\classes\Mode
$modeMode
returnsMode
Inherited members (21)
PropertiesDeclared byDescription
ListenersEvent
originEvent
returnValueSignal
MethodsDeclared byDescription
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
getReturn()Signal
HasListener($handler)Event
hasReturn()Signal
Instantiate($config)SingleSignal(Re)create the shared instance immediately, configured with $config merged into the class's existing config.
IsShared()SingleSignal
RemoveListener($handler)EventRemove the last added handler from the listeners.
Send($args)SingleSignalSend this signal, but only the FIRST time it's ever called: subsequent calls (with any, even different, $args) just return the same already-dispatched instance, unchanged.
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).
setReturn($value, $stop)Signal
Shared()SingleSignalGet the shared instance, creating (and configuring) it on first call.
Unshare($serialize)SingleSignalRemove the shared instance, so the next Shared() call creates a fresh one.
Value($args)SingleSignal