PEAR Progress2 logo

HTML_Progress2 : The Definitive Guide

Name

HTML_Progress2::addListener — Attachs a new observer

Synopsis

      require_once 'HTML/Progress2.php';
     
void HTML_Progress2::addListener( $callback,  
  $nName = EVENT_DISPATCHER_GLOBAL);  
mixed   $callback;
string   $nName = EVENT_DISPATCHER_GLOBAL;

Description

Adds a new observer to the Event Dispatcher that will listen for all messages emitted by this HTML_Progress2 instance.

Parameter

mixed $callback

PHP callback that will act as listener

string $nName

(optional) Expected notification name, serves as a filter

See

see HTML_Progress2::removeListener

Throws

throws HTML_PROGRESS2_ERROR_INVALID_CALLBACK, HTML_PROGRESS2_ERROR_INVALID_INPUT

Note

since 2.0.0

This function can not be called statically.

HTML_Progress2 : The Definitive Guide v 2.4.0 : April 20, 2007