JObserverUpdater

Implements \JObserverUpdaterInterface

Observer updater pattern implementation for Joomla

since

3.1.2

package

Joomla.Platform

Methods

__construct

Constructor

__construct(\JObservableInterface $observable) 
since

3.1.2

Arguments

$observable

\JObservableInterfaceThe observable subject object

attachObserver

Adds an observer to the JObservableInterface instance updated by this This method can be called from JObservableInterface::attachObserver

attachObserver(\JObserverInterface $observer) : void
since

3.1.2

Arguments

$observer

\JObserverInterfaceThe observer object

detachObserver

Removes an observer from the JObservableInterface instance updated by this This method can be called from JObservableInterface::attachObserver

detachObserver(String $observer) : void
since

3.6.0

Arguments

$observer

StringThe observer class name

doCallObservers

Enable/Disable calling of observers (this is useful when calling parent:: function

doCallObservers(boolean $enabled) : boolean
since

3.1.2

Arguments

$enabled

booleanEnable (true) or Disable (false) the observer events

Response

booleanReturns old state

getObserverOfClass

Gets the instance of the observer of class $observerClass

getObserverOfClass(string $observerClass) : \JTableObserver|null
since

3.1.2

Arguments

$observerClass

stringThe class name of the observer

Response

\JTableObserver|nullThe observer object of this class if any

update

Call all observers for $event with $params

update(string $event, array $params) : void
since

3.1.2

Arguments

$event

stringName of the event

$params

arrayParams of the event

Properties

aliases

Holds the key aliases for observers.

since

3.9.0

Type(s)

array

observers

Generic JObserverInterface observers for this JObservableInterface

since

3.1.2

Type(s)

\JObserverInterface

doCallObservers

Process observers (useful when a class extends significantly an observerved method, and calls observers itself

since

3.1.2

Type(s)

boolean