Subversion Repositories Applications.papyrus

Rev

Rev 1688 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
320 jpm 1
<?php
2
 
3
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
4
 
5
/**
6
 * Net_FTP observer.
7
 *
8
 * This class implements the Observer part of a Subject-Observer
9
 * design pattern. It listens to the events sent by a Net_FTP instance.
10
 * This module had many influences from the Log_observer code.
11
 *
12
 * PHP versions 4 and 5
13
 *
14
 * LICENSE: This source file is subject to version 3.0 of the PHP license
15
 * that is available through the world-wide-web at the following URI:
16
 * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
17
 * the PHP License and are unable to obtain it through the web, please
18
 * send a note to license@php.net so we can mail you a copy immediately.
19
 *
20
 * @category   Networking
21
 * @package    FTP
22
 * @author     Tobias Schlitt <toby@php.net>
23
 * @author     Laurent Laville <pear@laurent-laville.org>
24
 * @author     Chuck Hagenbuch <chuck@horde.org>
25
 * @copyright  1997-2005 The PHP Group
26
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
27
 * @version    CVS: $Id: Observer.php,v 1.1 2005-03-30 08:50:33 jpm Exp $
28
 * @link       http://pear.php.net/package/Net_FTP
29
 * @since      File available since Release 0.0.1
30
 */
31
 
32
/**
33
 * This class implements the Observer part of a Subject-Observer
34
 * design pattern. It listens to the events sent by a Net_FTP instance.
35
 * This module had many influences from the Log_observer code.
36
 *
37
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
38
 * @category   Networking
39
 * @package    FTP
40
 * @author     Laurent Laville <pear@laurent-laville.org>
41
 * @author     Chuck Hagenbuch <chuck@horde.org>
42
 * @author     Tobias Schlitt <toby@php.net>
43
 * @copyright  1997-2005 The PHP Group
44
 * @version    Release: 1.3.0
45
 * @link       http://pear.php.net/package/Net_FTP
46
 * @since      1.3.0.0
47
 * @access     public
48
 *
49
 * @example    observer_upload.php          An example of Net_FTP_Observer implementation.
50
 */
51
class Net_FTP_Observer
52
{
53
    /**
54
     * Instance-specific unique identification number.
55
     *
56
     * @var        integer
57
     * @since      1.3.0
58
     * @access     private
59
     */
60
    var $_id;
61
 
62
    /**
63
     * Creates a new basic Net_FTP_Observer instance.
64
     *
65
     * @since      1.3.0
66
     * @access     public
67
     */
68
    function Net_FTP_Observer()
69
    {
70
        $this->_id = md5(microtime());
71
    }
72
 
73
    /**
74
     * Returns the listener's identifier
75
     *
76
     * @return     string
77
     * @since      1.3.0
78
     * @access     public
79
     */
80
    function getId()
81
    {
82
        return $this->_id;
83
    }
84
 
85
    /**
86
     * This is a stub method to make sure that Net_FTP_Observer classes do
87
     * something when they are notified of a message.  The default behavior
88
     * is to just do nothing.
89
     * You should override this method.
90
     *
91
     * @param      mixed     $event         A hash describing the net event.
92
     *
93
     * @since      1.3.0
94
     * @access     public
95
     */
96
    function notify($event)
97
    {
98
        return;
99
    }
100
}
101
?>