]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/template/class_BaseTemplateEngine.php
Continued:
[core.git] / framework / main / classes / template / class_BaseTemplateEngine.php
index 772fa885b04850eb8aa299aefab156179e29f998..e996776554520fee0107fd5a017d676dd4113991 100644 (file)
@@ -13,6 +13,7 @@ use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Stacker\Stackable;
 use Org\Mxchange\CoreFramework\Utils\String\StringUtils;
 
 // Import SPL stuff
@@ -42,6 +43,12 @@ use \SplFileInfo;
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 abstract class BaseTemplateEngine extends BaseFrameworkSystem {
+       // Exception codes for the template engine
+       const EXCEPTION_TEMPLATE_TYPE_IS_UNEXPECTED   = 0x110;
+       const EXCEPTION_TEMPLATE_CONTAINS_INVALID_VAR = 0x111;
+       const EXCEPTION_INVALID_VIEW_HELPER           = 0x112;
+       const EXCEPTION_VARIABLE_IS_MISSING           = 0x113;
+
        /**
         * The file I/O instance for the template loader
         */
@@ -171,11 +178,10 @@ abstract class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        private $xmlCompacting = false;
 
-       // Exception codes for the template engine
-       const EXCEPTION_TEMPLATE_TYPE_IS_UNEXPECTED   = 0x110;
-       const EXCEPTION_TEMPLATE_CONTAINS_INVALID_VAR = 0x111;
-       const EXCEPTION_INVALID_VIEW_HELPER           = 0x112;
-       const EXCEPTION_VARIABLE_IS_MISSING           = 0x113;
+       /**
+        * Instance of the stacker
+        */
+       private $stackInstance = NULL;
 
        /**
         * Protected constructor
@@ -1634,6 +1640,25 @@ abstract class BaseTemplateEngine extends BaseFrameworkSystem {
                $this->fileIoInstance = $fileIoInstance;
        }
 
+       /**
+        * Setter for stacker instance
+        *
+        * @param       $stackInstance  An instance of an stacker
+        * @return      void
+        */
+       protected final function setStackInstance (Stackable $stackInstance) {
+               $this->stackInstance = $stackInstance;
+       }
+
+       /**
+        * Getter for stacker instance
+        *
+        * @return      $stackInstance  An instance of an stacker
+        */
+       public final function getStackInstance () {
+               return $this->stackInstance;
+       }
+
        /**
         * Removes all commentd, tabs and new-line characters to compact the content
         *