From 07f5140771388c9e0c8a99b0dd2e5d950bdb173b Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Thu, 14 Oct 2021 15:16:42 +1100 Subject: moving h-source subdir out. --- Library/ModAbstract.php | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Library/ModAbstract.php (limited to 'Library/ModAbstract.php') diff --git a/Library/ModAbstract.php b/Library/ModAbstract.php new file mode 100644 index 0000000..f576c10 --- /dev/null +++ b/Library/ModAbstract.php @@ -0,0 +1,42 @@ +. + +if (!defined('EG')) die('Direct access not allowed!'); + +//aach module class has to inherits from this abstract class +abstract class ModAbstract +{ + + //reference to a simpleXML object + protected $simpleXmlObj = null; + + //type hinting: simplexmlelement + public function __construct(SimpleXMLElement $simpleXmlObj) + { + $this->simpleXmlObj = $simpleXmlObj; + } + + //define the abstract method to render (create the HTML) of the single module + //$xmlObject: simpleXML object + abstract public function render(); + +} -- cgit v1.2.3