+ /**
+ * 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
+ */
+ public final function getTemplateInstance () {
+ return $this->templateInstance;
+ }
+
+ /**
+ * Initializes the template engine
+ *
+ * @param $templateType Type of template, e.g. 'html', 'image', 'console' ...
+ * @return void
+ */
+ public final function initTemplateEngine (string $templateType) {
+ // Prepare a template instance
+ $templateInstance = ObjectFactory::createObjectByConfiguredName(sprintf('%s_template_class', $templateType));
+
+ // Set it here
+ $this->setTemplateInstance($templateInstance);
+ }
+