JDispatcher

Extends \JEventDispatcher

Deprecated class placeholder. You should use JEventDispatcher instead.

deprecated

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

since

1.5

deprecated

3.0

package

Joomla.Legacy

Methods

__construct

Constructor.

__construct() 
since

1.5

attach

Attach an observer object

attach(object $observer) : void
inherited
since

3.0.0

Arguments

$observer

objectAn observer object to attach

detach

Detach an observer object

detach(object $observer) : boolean
inherited
since

3.0.0

Arguments

$observer

objectAn observer object to detach.

Response

booleanTrue if the observer object was detached.

getInstance

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

getInstance() : \JEventDispatcher
inherited static
since

3.0.0

Response

\JEventDispatcherThe EventDispatcher object.

getState

Get the state of the JEventDispatcher object

getState() : mixed
inherited
since

3.0.0

Response

mixedThe state of the object.

register

Registers an event handler to the event dispatcher

register(string $event, string $handler) : void
inherited
since

3.0.0

throws

\InvalidArgumentException

Arguments

$event

stringName of the event to register handler for

$handler

stringName of the event handler

trigger

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

trigger(string $event, array $args = array()) : array
inherited
since

3.0.0

Arguments

$event

stringThe event to trigger.

$args

arrayAn array of arguments.

Response

arrayAn array of results from each function call.

Properties

_observers

An array of Observer objects to notify

inherited
since

3.0.0

Type(s)

array

_state

The state of the observable object

inherited
since

3.0.0

Type(s)

mixed

_methods

A multi dimensional array of [function][] = key for observers

inherited
since

3.0.0

Type(s)

array

instance

Stores the singleton instance of the dispatcher.

inherited static
since

3.0.0

Type(s)

\JEventDispatcher