addListener Manual
attach a progress observer instance to the list of observers
Synopsis
boolean addListener( $observer )
Attributes
Name |
Type |
observer |
object |
Description
The addListener() method is used to attach a progress
observer or monitor instance to the list of listeners.
Example
<?php
require_once ('HTML/Progress/monitor.php');
$bar = new HTML_Progress();
$mon = new HTML_Progress_Monitor();
$li = $bar->getListeners();
print
(count($li) .
' listener(s)');
echo '<br/>';
$bar->addListener($mon);
$li = $bar->getListeners();
print
(count($li) .
' listener(s) now');
?>
See Also
removeListener Manual,
getListeners Manual