From fdc396e197be0f9bd42bd1919a3dd9d157b27386 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 30 Sep 2018 20:47:28 +0000 Subject: [PATCH] "rawcontent" is now a baseobject method --- index.php | 2 +- src/BaseModule.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index f535bcc0d1..46b95c75e4 100644 --- a/index.php +++ b/index.php @@ -353,7 +353,7 @@ if ($a->module_loaded) { // "rawContent" is especially meant for technical endpoints. // This endpoint doesn't need any theme initialization or other comparable stuff. - if (!$a->error && $a->module_class && method_exists($a->module_class, 'rawContent')) { + if (!$a->error && $a->module_class) { call_user_func([$a->module_class, 'rawContent']); } diff --git a/src/BaseModule.php b/src/BaseModule.php index 3ad4a4f055..1da9397a78 100644 --- a/src/BaseModule.php +++ b/src/BaseModule.php @@ -21,7 +21,16 @@ abstract class BaseModule extends BaseObject */ public static function init() { + } + /** + * @brief Module GET method to display raw content from technical endpoints + * + * Extend this method if the module is supposed to return communication data, + * e.g. from protocol implementations. + */ + public static function rawContent() + { } /**