Subversion Repositories Applications.gtt

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
94 jpm 1
<?php
2
/**
3
// +----------------------------------------------------------------------+
4
// | PEAR :: DB_NestedSet_DB                                                   |
5
// +----------------------------------------------------------------------+
6
// | Copyright (c) 1997-2003 The PHP Group                                |
7
// +----------------------------------------------------------------------+
8
// | This source file is subject to version 2.0 of the PHP license,       |
9
// | that is bundled with this package in the file LICENSE, and is        |
10
// | available at through the world-wide-web at                           |
11
// | http://www.php.net/license/2_02.txt.                                 |
12
// | If you did not receive a copy of the PHP license and are unable to   |
13
// | obtain it through the world-wide-web, please send a note to          |
14
// | license@php.net so we can mail you a copy immediately.               |
15
// +----------------------------------------------------------------------+
16
// | Authors: Daniel Khan <dk@webcluster.at>                              |
17
// +----------------------------------------------------------------------+
18
//
19
// $Id: Event.php,v 1.3 2003/10/07 00:11:27 datenpunk Exp $
20
//
21
//
22
*/
23
 
24
/**
25
* Poor mans event handler for DB_NestedSet
26
*
27
* Mostly for demo purposes or for extending it if
28
* someone has ideas...
29
*
30
* @author       Daniel Khan <dk@webcluster.at>
31
* @package      DB_NestedSet
32
* @version      $Revision: 1.3 $
33
* @access       public
34
*/
35
Class DB_NestedSetEvent extends PEAR {
36
 
37
    /**
38
    * Constructor
39
    *
40
    * @return void
41
    */
42
    function DB_NestedSetEvent() {
43
 
44
        $this->PEAR();
45
    }
46
 
47
    /**
48
    * Destructor
49
    *
50
    * @return void
51
    */
52
    function _DB_NestedSetEvent() {
53
 
54
        $this->_PEAR();
55
    }
56
 
57
 
58
    /**
59
    * Calls the event handler
60
    *
61
    * You may want to do a switch() here and call you methods
62
    * depending on the event
63
    *
64
    * @param    string $event   The Event that occured
65
    * @param    object node $node A Reference to the node object which was subject to changes
66
    * @param    array $eparams  A associative array of params which may be needed by the handler
67
    * @return void
68
    * @access private
69
    */
70
    function callEvent($event, &$node, $eparams = array()) {
71
 
72
        echo "<br>Override callEvent() if you want to have custom event handlers<br>\n";
73
        echo "Event $event was called with the following params:<br><br>\n";
74
        echo "<PRE>";
75
        print_r($eparams);
76
        echo "</PRE><br>\n";
77
    }
78
}
79
?>