]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 7 Nov 2020 20:25:59 +0000 (21:25 +0100)
committerRoland Häder <roland@mxchange.org>
Sat, 7 Nov 2020 20:25:59 +0000 (21:25 +0100)
- parsers may have template engines

Signed-off-by: Roland Häder <roland@mxchange.org>
framework/main/classes/parser/class_BaseParser.php

index ced10606b97fb60d0f3ecad586b7f1aca67ceb71..48a310035b3e7b24c50a96339b028c073e6eac7c 100644 (file)
@@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Parser;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
 
 /**
  * A general Parser
@@ -28,6 +29,11 @@ use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 abstract class BaseParser extends BaseFrameworkSystem {
+       /**
+        * Template engine instance
+        */
+       private $templateInstance = NULL;
+
        /**
         * Protected constructor
         *
@@ -39,4 +45,23 @@ abstract class BaseParser extends BaseFrameworkSystem {
                parent::__construct($className);
        }
 
+       /**
+        * Setter for template engine instances
+        *
+        * @param       $templateInstance       An instance of a template engine class
+        * @return      void
+        */
+       protected final function setTemplateInstance (CompileableTemplate $templateInstance) {
+               $this->templateInstance = $templateInstance;
+       }
+
+       /**
+        * Getter for template engine instances
+        *
+        * @return      $templateInstance       An instance of a template engine class
+        */
+       protected final function getTemplateInstance () {
+               return $this->templateInstance;
+       }
+
 }