]> git.mxchange.org Git - friendica.git/blob - src/BaseModule.php
hashtag autocomplete
[friendica.git] / src / BaseModule.php
1 <?php
2
3 namespace Friendica;
4
5 /**
6  * All modules in Friendica should extend BaseModule, although not all modules
7  * need to extend all the methods described here
8  *
9  * @author Hypolite Petovan mrpetovan@gmail.com
10  */
11 abstract class BaseModule extends BaseObject
12 {
13         /**
14          * @brief Initialization method common to both content() and post()
15          *
16          * Extend this method if you need to do any shared processing before both
17          * content() or post()
18          */
19         public static function init()
20         {
21
22         }
23
24         /**
25          * @brief Module GET method to display any content
26          *
27          * Extend this method if the module is supposed to return any display
28          * through a GET request. It can be an HTML page through templating or a
29          * XML feed or a JSON output.
30          *
31          * @return string
32          */
33         public static function content()
34         {
35                 $o = '';
36
37                 return $o;
38         }
39
40         /**
41          * @brief Module POST method to process submitted data
42          *
43          * Extend this method if the module is supposed to process POST requests.
44          * Doesn't display any content
45          */
46         public static function post()
47         {
48                 // goaway('module');
49         }
50
51         /**
52          * @brief Called after post()
53          *
54          * Unknown purpose
55          */
56         public static function afterpost()
57         {
58
59         }
60 }