Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

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