Joomla CMS  3.9.25 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.9.25 et du framework Joomla Platform intégré
Référence de la classe FOFUtilsObservableDispatcher
+ Graphe d'héritage de FOFUtilsObservableDispatcher:

Fonctions membres publiques

 getState ()
 
 register ($event, $handler)
 
 trigger ($event, $args=array())
 
 attach ($observer)
 
 detach ($observer)
 
- Fonctions membres publiques hérités de FOFUtilsObject
 __construct ($properties=null)
 
 __toString ()
 
 def ($property, $default=null)
 
 get ($property, $default=null)
 
 getProperties ($public=true)
 
 getError ($i=null, $toString=true)
 
 getErrors ()
 
 set ($property, $value=null)
 
 setProperties ($properties)
 
 setError ($error)
 

Fonctions membres publiques statiques

static getInstance ()
 

Attributs protégés

 $_observers = array()
 
 $_state = null
 
 $_methods = array()
 
- Attributs protégés hérités de FOFUtilsObject
 $_errors = array()
 

Attributs protégés statiques

static $instance = null
 

Description détaillée

Class to handle dispatching of events.

This is the Observable part of the Observer design pattern for the event architecture.

This class is based on JEventDispatcher as found in Joomla! 3.2.0

Documentation des fonctions membres

◆ attach()

attach (   $observer)

Attach an observer object

Paramètres
object$observerAn observer object to attach
Renvoie
void

Références $check, $class, et $key.

◆ detach()

detach (   $observer)

Detach an observer object

Paramètres
object$observerAn observer object to detach.
Renvoie
boolean True if the observer object was detached.

Références $key.

◆ getInstance()

static getInstance ( )
static

Returns the global Event Dispatcher object, only creating it if it doesn't already exist.

Renvoie
FOFUtilsObservableDispatcher The EventDispatcher object.

Références null.

Référencé par FOFModel\preprocessForm().

◆ getState()

getState ( )

Get the state of the FOFUtilsObservableDispatcher object

Renvoie
mixed The state of the object.

◆ register()

register (   $event,
  $handler 
)

Registers an event handler to the event dispatcher

Paramètres
string$eventName of the event to register handler for
string$handlerName of the event handler
Renvoie
void
Exceptions
InvalidArgumentException

Références elseif.

◆ trigger()

trigger (   $event,
  $args = array() 
)

Triggers an event by dispatching arguments to all observers that handle the event and returning their return values.

Paramètres
string$eventThe event to trigger.
array$argsAn array of arguments.
Renvoie
array An array of results from each function call.

Références $key, $value, et elseif.

Documentation des champs

◆ $_methods

$_methods = array()
protected

◆ $_observers

$_observers = array()
protected

◆ $_state

$_state = null
protected

◆ $instance

$instance = null
staticprotected

La documentation de cette classe a été générée à partir du fichier suivant :