blob: e2e2ce2f19949a470ee799f0dce351bf9830b350 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
<?php
/**
* Phergie
*
* PHP version 5
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.
* It is also available through the world-wide-web at this URL:
* http://phergie.org/license
*
* @category Phergie
* @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
* @license http://phergie.org/license New BSD License
* @link http://pear.phergie.org/package/Phergie
*/
/**
* Base class for end-user interfaces.
*
* @category Phergie
* @package Phergie
* @author Phergie Development Team <team@phergie.org>
* @license http://phergie.org/license New BSD License
* @link http://pear.phergie.org/package/Phergie
*/
abstract class Phergie_Ui_Abstract
{
/**
* Handler for when a server connection is attempted.
*
* @param string $host Server hostname
*
* @return void
*/
public function onConnect($host)
{
}
/**
* Handler for when an attempt is made to load a plugin.
*
* @param string $plugin Short name of the plugin
*
* @return void
*/
public function onPluginLoad($plugin)
{
}
/**
* Handler for when a plugin fails to load.
*
* @param string $plugin Short name of the plugin
* @param string $message Message describing the reason for the failure
*
* @return void
*/
public function onPluginFailure($plugin, $message)
{
}
/**
* Handler for when the bot receives an IRC event.
*
* @param Phergie_Event_Abstract $event Received event
* @param Phergie_Connection $connection Connection on which the event
* was received
*
* @return void
*/
public function onEvent(Phergie_Event_Abstract $event,
Phergie_Connection $connection
) {
}
/**
* Handler for when the bot sends a command to a server.
*
* @param Phergie_Event_Command $event Event representing the command
* being sent
* @param Phergie_Connection $connection Connection on which the command
* is being sent
*
* @return void
*/
public function onCommand(Phergie_Event_Command $event,
Phergie_Connection $connection
) {
}
/**
* Handler for when the bot terminates a connection to a server.
*
* @param Phergie_Connection $connection Terminated connection
*
* @return void
*/
public function onQuit(Phergie_Connection $connection)
{
}
/**
* Handler for when the bot shuts down after terminating all server
* connections.
*
* @return void
*/
public function onShutdown()
{
}
}
|