xref: /plugin/smtp/action.php (revision 4dc22474951ab24d4689b882faa867e66a266a57)
1*4dc22474SAndreas Gohr<?php
2*4dc22474SAndreas Gohr/**
3*4dc22474SAndreas Gohr * DokuWiki Plugin smtp (Action Component)
4*4dc22474SAndreas Gohr *
5*4dc22474SAndreas Gohr * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
6*4dc22474SAndreas Gohr * @author  Andreas Gohr <andi@splitbrain.org>
7*4dc22474SAndreas Gohr */
8*4dc22474SAndreas Gohr
9*4dc22474SAndreas Gohr// must be run within Dokuwiki
10*4dc22474SAndreas Gohrif(!defined('DOKU_INC')) die();
11*4dc22474SAndreas Gohr
12*4dc22474SAndreas Gohrclass action_plugin_smtp extends DokuWiki_Action_Plugin {
13*4dc22474SAndreas Gohr
14*4dc22474SAndreas Gohr    /**
15*4dc22474SAndreas Gohr     * Registers a callback function for a given event
16*4dc22474SAndreas Gohr     *
17*4dc22474SAndreas Gohr     * @param Doku_Event_Handler $controller DokuWiki's event controller object
18*4dc22474SAndreas Gohr     * @return void
19*4dc22474SAndreas Gohr     */
20*4dc22474SAndreas Gohr    public function register(Doku_Event_Handler $controller) {
21*4dc22474SAndreas Gohr
22*4dc22474SAndreas Gohr       $controller->register_hook('MAIL_MESSAGE_SEND', 'FIXME', $this, 'handle_mail_message_send');
23*4dc22474SAndreas Gohr
24*4dc22474SAndreas Gohr    }
25*4dc22474SAndreas Gohr
26*4dc22474SAndreas Gohr    /**
27*4dc22474SAndreas Gohr     * [Custom event handler which performs action]
28*4dc22474SAndreas Gohr     *
29*4dc22474SAndreas Gohr     * @param Doku_Event $event  event object by reference
30*4dc22474SAndreas Gohr     * @param mixed      $param  [the parameters passed as fifth argument to register_hook() when this
31*4dc22474SAndreas Gohr     *                           handler was registered]
32*4dc22474SAndreas Gohr     * @return void
33*4dc22474SAndreas Gohr     */
34*4dc22474SAndreas Gohr
35*4dc22474SAndreas Gohr    public function handle_mail_message_send(Doku_Event &$event, $param) {
36*4dc22474SAndreas Gohr    }
37*4dc22474SAndreas Gohr
38*4dc22474SAndreas Gohr}
39*4dc22474SAndreas Gohr
40*4dc22474SAndreas Gohr// vim:ts=4:sw=4:et:
41