Class JObservable

Description

Abstract observable class to implement the observer design pattern

  • deprecated: 12.3 (Platform) & 4.0 (CMS)
  • since: 11.1

Located in /libraries/legacy/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()

Documentation generated on Tue, 19 Nov 2013 15:09:46 +0100 by phpDocumentor 1.4.3