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

Source for file observer.php

Documentation is available at observer.php

  1. <?php
  2. // +----------------------------------------------------------------------+
  3. // | PEAR :: HTML :: Progress                                             |
  4. // +----------------------------------------------------------------------+
  5. // | Copyright (c) 1997-2004 The PHP Group                                |
  6. // +----------------------------------------------------------------------+
  7. // | This source file is subject to version 3.0 of the PHP license,       |
  8. // | that is bundled with this package in the file LICENSE, and is        |
  9. // | available at through the world-wide-web at                           |
  10. // | http://www.php.net/license/3_0.txt.                                  |
  11. // | If you did not receive a copy of the PHP license and are unable to   |
  12. // | obtain it through the world-wide-web, please send a note to          |
  13. // | license@php.net so we can mail you a copy immediately.               |
  14. // +----------------------------------------------------------------------+
  15. // | Author: Laurent Laville <pear@laurent-laville.org>                   |
  16. // +----------------------------------------------------------------------+
  17. //
  18. // $Id: observer.php,v 1.3 2004/07/03 14:48:15 farell Exp $
  19.  
  20. /**
  21.  * The HTML_Progress_Observer implements the observer pattern
  22.  * for watching progress bar activity and taking actions
  23.  * on exceptional events.
  24.  *
  25.  * @version    1.2.0
  26.  * @author     Laurent Laville <pear@laurent-laville.org>
  27.  * @access     public
  28.  * @package    HTML_Progress
  29.  * @subpackage Progress_Observer
  30.  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
  31.  */
  32.  
  33. {
  34.     /**
  35.      * Instance-specific unique identification number.
  36.      *
  37.      * @var        integer 
  38.      * @since      1.0
  39.      * @access     private
  40.      */
  41.     var $_id;
  42.  
  43.     /**
  44.      * Creates a new basic HTML_Progress_Observer instance.
  45.      *
  46.      * @since      1.0
  47.      * @access     public
  48.      */
  49.     function HTML_Progress_Observer()
  50.     {
  51.         $this->_id md5(microtime());
  52.     }
  53.  
  54.     /**
  55.      * This is a stub method to make sure that HTML_Progress_Observer classes do
  56.      * something when they are notified of a message.  The default behavior
  57.      * is to just write into a file 'progress_observer.log' in current directory.
  58.      * You should override this method.
  59.      *
  60.      * Default events :
  61.      * - setMinimum
  62.      * - setMaximum
  63.      * - setValue
  64.      *
  65.      * @param      mixed     $event         A hash describing the progress event.
  66.      * @since      1.0
  67.      * @access     public
  68.      */
  69.     function notify($event)
  70.     {
  71.         $msg (is_array($event)) serialize($event$event;
  72.         error_log ("$msg \n"3'progress_observer.log');
  73.     }
  74. }
  75.  
  76. ?>

Documentation generated on Mon, 11 Mar 2019 13:52:38 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.