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