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

Source for file Observer.php

Documentation is available at Observer.php

  1. <?php
  2.  
  3. // $Id: Observer.php,v 1.1 2004/03/12 23:29:55 toby Exp $
  4.  
  5. /**
  6.  * This class implements the Observer part of a Subject-Observer
  7.  * design pattern. It listens to the events sent by a Net_FTP instance.
  8.  * This module had many influences from the Log_observer code.
  9.  *
  10.  * @version    1.3
  11.  * @author     Laurent Laville <pear@laurent-laville.org>
  12.  * @author     Tobias Schlitt <toby@php.net>
  13.  * @author     Chuck Hagenbuch <chuck@horde.org>
  14.  * @access     public
  15.  * @category   Networking
  16.  * @package    Net_FTP
  17.  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
  18.  *
  19.  * @example    observer_upload.php          An example of Net_FTP_Observer implementation.
  20.  */
  21.  
  22. {
  23.     /**
  24.      * Instance-specific unique identification number.
  25.      *
  26.      * @var        integer 
  27.      * @since      1.3
  28.      * @access     private
  29.      */
  30.     var $_id;
  31.  
  32.     /**
  33.      * Creates a new basic Net_FTP_Observer instance.
  34.      *
  35.      * @since      1.3
  36.      * @access     public
  37.      */
  38.     function Net_FTP_Observer()
  39.     {
  40.         $this->_id md5(microtime());
  41.     }
  42.  
  43.     /**
  44.      * Returns the listener's identifier
  45.      *
  46.      * @return     string 
  47.      * @since      1.3
  48.      * @access     public
  49.      */
  50.     function getId()
  51.     {
  52.         return $this->_id;
  53.     }
  54.  
  55.     /**
  56.      * This is a stub method to make sure that Net_FTP_Observer classes do
  57.      * something when they are notified of a message.  The default behavior
  58.      * is to just do nothing.
  59.      * You should override this method.
  60.      *
  61.      * @param      mixed     $event         A hash describing the net event.
  62.      *
  63.      * @since      1.3
  64.      * @access     public
  65.      */
  66.     function notify($event)
  67.     {
  68.         return;
  69.     }
  70. }
  71. ?>

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