Class JObservable

Description

Abstract observable class to implement the observer design pattern

  • deprecated: 12.3
  • since: 11.1

Located in /libraries/joomla/base/observable.php (line 21)

JObject
   |
   --JObservable
Variable Summary
array $_methods
array $_observers
mixed $_state
Method Summary
JObservable __construct ()
void attach (object $observer)
boolean detach (object $observer)
mixed getState ()
array notify ()
Variables
array $_methods = array() (line 48)

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

  • deprecated: 12.3
  • since: 11.1
  • access: protected
array $_observers = array() (line 30)

An array of Observer objects to notify

  • deprecated: 12.3
  • since: 11.1
  • access: protected
mixed $_state = null (line 39)

The state of the observable object

  • deprecated: 12.3
  • since: 11.1
  • access: protected

Inherited Variables

Inherited from JObject

JObject::$_errors
Methods
Constructor __construct (line 57)

Constructor

Note: Make Sure it's not directly instantiated

  • deprecated: 12.3
  • access: public
JObservable __construct ()

Redefinition of:
JObject::__construct()
Class constructor, overridden in descendant classes.
attach (line 104)

Attach an observer object

  • deprecated: 12.3
  • since: 11.1
  • access: public
void attach (object $observer)
  • object $observer: An observer object to attach
detach (line 173)

Detach an observer object

  • return: True if the observer object was detached.
  • deprecated: 12.3
  • since: 11.1
  • access: public
boolean detach (object $observer)
  • object $observer: An observer object to detach.
getState (line 70)

Get the state of the JObservable object

  • return: The state of the object.
  • deprecated: 12.3
  • since: 11.1
  • access: public
mixed getState ()
notify (line 83)

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

  • return: Array of return values from the observers
  • deprecated: 12.3
  • since: 11.1
  • access: public
array notify ()

Inherited Methods

Inherited From JObject

JObject::__construct()
JObject::def()
JObject::get()
JObject::getError()
JObject::getErrors()
JObject::getProperties()
JObject::set()
JObject::setError()
JObject::setProperties()
JObject::toString()
JObject::__toString()

Documentation generated on Mon, 25 Jun 2012 13:58:19 -0500 by phpDocumentor 1.4.4