class JDispatcher extends JEventDispatcher

Deprecated class placeholder. You should use JEventDispatcher instead.

Methods

static  JEventDispatcher
getInstance()

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

mixed
getState()

Get the state of the JEventDispatcher object

void
register( string $event, string $handler)

Registers an event handler to the event dispatcher

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

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

void
attach( object $observer)

Attach an observer object

boolean
detach( object $observer)

Detach an observer object

__construct()

Constructor.

Details

static JEventDispatcher getInstance()

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

Return Value

JEventDispatcher The EventDispatcher object.

mixed getState()

Get the state of the JEventDispatcher object

Return Value

mixed The state of the object.

void register( string $event, string $handler)

Registers an event handler to the event dispatcher

Parameters

string $event Name of the event to register handler for
string $handler Name of the event handler

Return Value

void

Exceptions

InvalidArgumentException

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

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

Parameters

string $event The event to trigger.
array $args An array of arguments.

Return Value

array An array of results from each function call.

void attach( object $observer)

Attach an observer object

Parameters

object $observer An observer object to attach

Return Value

void

boolean detach( object $observer)

Detach an observer object

Parameters

object $observer An observer object to detach.

Return Value

boolean True if the observer object was detached.

__construct()

Constructor.