* @author Laurent Laville * @author Chuck Hagenbuch * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id$ * @link http://pear.php.net/package/Net_FTP * @since File available since Release 0.0.1 */ /** * This class implements the Observer part of a Subject-Observer * design pattern. It listens to the events sent by a Net_FTP instance. * This module had many influences from the Log_observer code. * * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @category Networking * @package FTP * @author Laurent Laville * @author Chuck Hagenbuch * @author Tobias Schlitt * @copyright 1997-2005 The PHP Group * @version Release: @package_version@ * @link http://pear.php.net/package/Net_FTP * @since 1.3.0.0 * @access public * * @example observer_upload.php An example of Net_FTP_Observer implementation. */ class Net_FTP_Observer { /** * Instance-specific unique identification number. * * @var integer * @since 1.3.0 * @access private */ var $_id; /** * Creates a new basic Net_FTP_Observer instance. * * @since 1.3.0 * @access public */ function Net_FTP_Observer() { $this->_id = md5(microtime()); } /** * Returns the listener's identifier * * @return string * @since 1.3.0 * @access public */ function getId() { return $this->_id; } /** * This is a stub method to make sure that Net_FTP_Observer classes do * something when they are notified of a message. The default behavior * is to just do nothing. * You should override this method. * * @param mixed $event A hash describing the net event. * * @since 1.3.0 * @access public */ function notify($event) { return; } } ?>