--- /dev/null
+<?php\r
+\r
+namespace Friendica;\r
+\r
+/**\r
+ * All modules in Friendica should extend BaseModule, although not all modules\r
+ * need to extend all the methods described here\r
+ *\r
+ * @author Hypolite Petovan mrpetovan@gmail.com\r
+ */\r
+abstract class BaseModule extends BaseObject\r
+{\r
+ /**\r
+ * @brief Initialization method common to both content() and post()\r
+ *\r
+ * Extend this method if you need to do any shared processing before both\r
+ * content() or post()\r
+ */\r
+ public static function init()\r
+ {\r
+\r
+ }\r
+\r
+ /**\r
+ * @brief Module GET method to display any content\r
+ *\r
+ * Extend this method if the module is supposed to return any display\r
+ * through a GET request. It can be an HTML page through templating or a\r
+ * XML feed or a JSON output.\r
+ *\r
+ * @return string\r
+ */\r
+ public static function content()\r
+ {\r
+ $o = '';\r
+\r
+ return $o;\r
+ }\r
+\r
+ /**\r
+ * @brief Module POST method to process submitted data\r
+ *\r
+ * Extend this method if the module is supposed to process POST requests.\r
+ * Doesn't display any content\r
+ */\r
+ public static function post()\r
+ {\r
+ // goaway('module');\r
+ }\r
+\r
+ /**\r
+ * @brief Called after post()\r
+ *\r
+ * Unknown purpose\r
+ */\r
+ public static function afterpost()\r
+ {\r
+\r
+ }\r
+}\r