/** * Constructor: Associates to $unit $this observer * * @param \JObservableInterface $unit Object to be observed. * * @since 3.1.2 */ public function __construct(\JObservableInterface $unit) { $unit->attachObserver($this); $this->unit = $unit; }
/** * Constructor: Associates to $transaction $this observer * * @param \JObservableInterface $transaction Object to be observed. * * @since 3.1.2 */ public function __construct(\JObservableInterface $transaction) { $transaction->attachObserver($this); $this->transaction = $transaction; }