Event_SignalEmitter
[ class tree: Event_SignalEmitter ] [ index: Event_SignalEmitter ] [ all elements ]

Class: Event_SignalEmitter_Dispatcher

Source Location: /Event_SignalEmitter-0.3.2/Event/SignalEmitter/Dispatcher.php

Class Overview

Event_SignalEmitter
   |
   --Event_SignalEmitter_Dispatcher

Dispatcher class that can be used as central hub for all signals. For this, it includes a singleton method and allows signals to be emitted from outside.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: Event_SignalEmitter

Event_SignalEmitter::block()
Blocks a signal handler
Event_SignalEmitter::connect()
Add a listener. Callbacks get the listener object as first parameter.
Event_SignalEmitter::connectImplementation()
Internal implementation to add a listener.
Event_SignalEmitter::connectSimple()
Alias of @link connect_simple()
Event_SignalEmitter::connect_simple()
Add a simple listener. Callbacks do not get the emitter object.
Event_SignalEmitter::disconnect()
Disconnects a signal handler.
Event_SignalEmitter::emit()
Emit a signal to all listeners Takes any number of params.
Event_SignalEmitter::registerSignal()
Alias of @link register_signal()
Event_SignalEmitter::register_signal()
Registers a signal that can be emitted.
Event_SignalEmitter::unblock()
Unblocks a signal handler

Class Details

[line 28]
Dispatcher class that can be used as central hub for all signals. For this, it includes a singleton method and allows signals to be emitted from outside.


[ Top ]


Class Variables

$arInstances = array()

[line 30]

  • Access: protected

Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 38]

Event_SignalEmitter_Dispatcher __construct( )

Please use Event_SignalEmitter_Dispatcher::singleton() to get an instance of this class.
  • Access: protected

[ Top ]

emit   [line 73]

void emit( string $strSignal, mixed $param1, ... 2)

Emit a signal to all listeners.

Takes any number of params.

  • Access: public

Overrides Event_SignalEmitter::emit() (Emit a signal to all listeners Takes any number of params.)

Parameters:

string   $strSignal     Signal to emit (determines listener list)
mixed   $param1     Parameter to pass to the receiving functions
...   2     

[ Top ]

singleton   [line 52]

Event_SignalEmitter_Dispatcher singleton( [string $strName = 'default'])

Returns the dispatcher instance.

This method makes sure only one instance exists.

  • Return: Dispatcher object
  • Access: public

Parameters:

string   $strName     Name of dispatcher instance

[ Top ]


Documentation generated on Mon, 25 Oct 2010 14:30:27 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.