NAME

org::puremvc::perl5::patterns::observer::Observer

Implementation of the pureMVC Observer pattern.


DESCRIPTION

An Observer is an object that encapsulates information about an interested object with a method that should be called when a particular notification is broadcast.

In PureMVC, the Observer class assumes these responsibilities:


INTERFACE

Methods

new

sub new( $notify_method, $notify_context );

Constructor.

$notify_method notification method on $notify_context interested object should take one parameter of type Notification.

Parameters

notifyObserver

sub notifyObserver( $notification );

Notifies the interested object.

Parameters

setNotifyMethod

sub setNotifyMethod( $notify_method );

Notification method setter.

Parameters

getNotifyMethod

sub getNotifyMethod();

Notification method getter.

Returns

String - Method name inside context object which is called when notifying context object.

setNotifyContext

sub setNotifyContext( $notify_context );

Notification context setter.

Parameters

getNotifyContext

sub getNotifyContext();

Notification context getter.

Returns

* - Object interested in being notified.


SEE ALSO

org::puremvc::perl5::core::Model

org::puremvc::perl5::core::View

org::puremvc::perl5::core::Controller

org::puremvc::perl5::patterns::facade::Facade

org::puremvc::perl5::patterns::observer::Notification

org::puremvc::perl5::patterns::proxy::Proxy

org::puremvc::perl5::patterns::mediator::Mediator

org::puremvc::perl5::patterns::command::SimpleCommand

org::puremvc::perl5::patterns::command::MacroCommand

org::puremvc::perl5::patterns::observer::Notifier