JObserverMapper

Observer mapping pattern implementation for Joomla

since

3.1.2

package

Joomla.Platform

Methods

addObserverClassToClass

Adds a mapping to observe $observerClass subjects with $observableClass observer/listener, attaching it on creation with $params on $observableClass instance creations

addObserverClassToClass(string $observerClass, string $observableClass, array|boolean $params = array()) : void
static
since

3.1.2

Arguments

$observerClass

stringThe name of the observer class (implementing JObserverInterface)

$observableClass

stringThe name of the observable class (implementing JObservableInterface)

$params

array|booleanThe params to give to the JObserverInterface::createObserver() function, or false to remove mapping

attachAllObservers

Attaches all applicable observers to an $observableObject

attachAllObservers(\JObservableInterface $observableObject) : void
static
since

3.1.2

Arguments

$observableObject

\JObservableInterfaceThe observable subject object

Properties

observations

Array: array( JObservableInterface_classname => array( JObserverInterface_classname => array( paramname => param, .

static

... ) ) )

since

3.1.2

Type(s)

array