JObservable

Extends \JObject

Abstract observable class to implement the observer design pattern

deprecated
since

1.5

deprecated

2.5

package

Joomla.Legacy

Methods

__construct

Constructor

__construct() 
deprecated

Note: Make Sure it's not directly instantiated

since

1.5

deprecated

2.5

attach

Attach an observer object

attach(object $observer) : void
deprecated
since

1.5

deprecated

2.5

Arguments

$observer

objectAn observer object to attach

detach

Detach an observer object

detach(object $observer) : boolean
deprecated
since

1.5

deprecated

2.5

Arguments

$observer

objectAn observer object to detach.

Response

booleanTrue if the observer object was detached.

getState

Get the state of the JObservable object

getState() : mixed
deprecated
since

1.5

deprecated

2.5

Response

mixedThe state of the object.

notify

Update each attached observer object and return an array of their return values

notify() : array
deprecated
since

1.5

deprecated

2.5

Response

arrayArray of return values from the observers

Properties

_observers

An array of Observer objects to notify

deprecated
since

1.5

deprecated

2.5

Type(s)

array

_state

The state of the observable object

deprecated
since

1.5

deprecated

2.5

Type(s)

mixed

_methods

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

deprecated
since

1.6

deprecated

2.5

Type(s)

array