]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/template/producer/test_units/class_XmlCruncherTestUnitTemplateEngine.php
Updated 'core'.
[hub.git] / application / hub / main / template / producer / test_units / class_XmlCruncherTestUnitTemplateEngine.php
index dcf248ab9d7c229011aac1d2cd6a02e13bd7b948..40f19412d0b974e270537388c985a69e43feb3ca 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * An TestUnit template engine class for XML templates
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2011 - 2014 Cruncher Developer Team
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.shipsimu.org
  * @todo               This template engine does not make use of setTemplateType()
  *
  * This program is free software: you can redistribute it and/or modify
@@ -33,7 +33,7 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
                parent::__construct(__CLASS__);
 
                // Init sub nodes
-               $this->subNodes = array(
+               $this->setSubNodes(array(
                        'meta-data',
                        'global-project-identifier',
                        'test-unit-created',
@@ -46,7 +46,7 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
                        'cruncher-key',
                        'key-id',
                        'key-value'
-               );
+               ));
        }
 
        /**
@@ -71,21 +71,6 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
                return $templateInstance;
        }
 
-       /**
-        * Load a specified cruncher_test_unit template into the engine
-        *
-        * @param       $template       The cruncher_test_unit template we shall load which is
-        *                                              located in 'cruncher_test_unit' by default
-        * @return      void
-        */
-       public function loadCruncherTestUnitTemplate ($template) {
-               // Set template type
-               $this->setTemplateType($this->getConfigInstance()->getConfigEntry('cruncher_test_unit_template_type'));
-
-               // Load the special template
-               $this->loadTemplate($template);
-       }
-
        /**
         * Currently not used
         *
@@ -100,12 +85,12 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
                // Is this string empty?
                if (empty($characters)) {
                        // Then skip it silently
-                       return false;
+                       return;
                } // END - if
 
                // Assign the found characters to variable and use the last entry from
                // stack as the name
-               parent::assignVariable($this->getStackerInstance()->getNamed('cruncher_test_unit'), $characters);
+               parent::assignVariable($this->getStackInstance()->getNamed('cruncher_test_unit'), $characters);
        }
 
        /**
@@ -122,9 +107,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function startCruncherTestUnit () {
+       protected function startTestUnit () {
                // Push the node name on the stacker
-               $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'cruncher-test-unit');
+               $this->getStackInstance()->pushNamed('cruncher_test_unit', 'cruncher-test-unit');
        }
 
        /**
@@ -132,9 +117,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function startMetaData () {
+       protected function startMetaData () {
                // Push the node name on the stacker
-               $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'meta-data');
+               $this->getStackInstance()->pushNamed('cruncher_test_unit', 'meta-data');
        }
 
        /**
@@ -142,9 +127,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function startGlobalProjectIdentifier () {
+       protected function startGlobalProjectIdentifier () {
                // Push the node name on the stacker
-               $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'global-project-identifier');
+               $this->getStackInstance()->pushNamed('cruncher_test_unit', 'global-project-identifier');
        }
 
        /**
@@ -152,9 +137,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function finishGlobalProjectIdentifier () {
+       protected function finishGlobalProjectIdentifier () {
                // Pop the last entry
-               $this->getStackerInstance()->popNamed('cruncher_test_unit');
+               $this->getStackInstance()->popNamed('cruncher_test_unit');
        }
 
        /**
@@ -162,9 +147,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function startTestUnitCreated () {
+       protected function startTestUnitCreated () {
                // Push the node name on the stacker
-               $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'test-unit-created');
+               $this->getStackInstance()->pushNamed('cruncher_test_unit', 'test-unit-created');
        }
 
        /**
@@ -172,9 +157,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function finishTestUnitCreated () {
+       protected function finishTestUnitCreated () {
                // Pop the last entry
-               $this->getStackerInstance()->popNamed('cruncher_test_unit');
+               $this->getStackInstance()->popNamed('cruncher_test_unit');
        }
 
        /**
@@ -182,9 +167,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function startCipher () {
+       protected function startCipher () {
                // Push the node name on the stacker
-               $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'cipher');
+               $this->getStackInstance()->pushNamed('cruncher_test_unit', 'cipher');
        }
 
        /**
@@ -192,9 +177,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function startCipherFunction () {
+       protected function startCipherFunction () {
                // Push the node name on the stacker
-               $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'cipher-function');
+               $this->getStackInstance()->pushNamed('cruncher_test_unit', 'cipher-function');
        }
 
        /**
@@ -202,9 +187,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function finishCipherFunction () {
+       protected function finishCipherFunction () {
                // Pop the last entry
-               $this->getStackerInstance()->popNamed('cruncher_test_unit');
+               $this->getStackInstance()->popNamed('cruncher_test_unit');
        }
 
        /**
@@ -212,9 +197,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function startCipherName () {
+       protected function startCipherName () {
                // Push the node name on the stacker
-               $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'cipher-name');
+               $this->getStackInstance()->pushNamed('cruncher_test_unit', 'cipher-name');
        }
 
        /**
@@ -222,9 +207,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function finishCipherName () {
+       protected function finishCipherName () {
                // Pop the last entry
-               $this->getStackerInstance()->popNamed('cruncher_test_unit');
+               $this->getStackInstance()->popNamed('cruncher_test_unit');
        }
 
        /**
@@ -232,9 +217,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function finishCipher () {
+       protected function finishCipher () {
                // Pop the last entry
-               $this->getStackerInstance()->popNamed('cruncher_test_unit');
+               $this->getStackInstance()->popNamed('cruncher_test_unit');
        }
 
        /**
@@ -242,9 +227,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function finishMetaData () {
+       protected function finishMetaData () {
                // Pop the last entry
-               $this->getStackerInstance()->popNamed('cruncher_test_unit');
+               $this->getStackInstance()->popNamed('cruncher_test_unit');
        }
 
        /**
@@ -252,9 +237,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function startUnprocessedData () {
+       protected function startUnprocessedData () {
                // Push the node name on the stacker
-               $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'unprocessed-data');
+               $this->getStackInstance()->pushNamed('cruncher_test_unit', 'unprocessed-data');
        }
 
        /**
@@ -262,9 +247,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function startEncryptedMessage () {
+       protected function startEncryptedMessage () {
                // Push the node name on the stacker
-               $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'encrypted-message');
+               $this->getStackInstance()->pushNamed('cruncher_test_unit', 'encrypted-message');
        }
 
        /**
@@ -272,9 +257,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function finishEncryptedMessage () {
+       protected function finishEncryptedMessage () {
                // Pop the last entry
-               $this->getStackerInstance()->popNamed('cruncher_test_unit');
+               $this->getStackInstance()->popNamed('cruncher_test_unit');
        }
 
        /**
@@ -284,9 +269,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         * @return      void
         * @todo        Handle $keyCount
         */
-       private function startCruncherKeyList ($keyCount) {
+       protected function startCruncherKeyList ($keyCount) {
                // Push the node name on the stacker
-               $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'cruncher-key-list');
+               $this->getStackInstance()->pushNamed('cruncher_test_unit', 'cruncher-key-list');
        }
 
        /**
@@ -294,9 +279,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function startCruncherKey () {
+       protected function startCruncherKey () {
                // Push the node name on the stacker
-               $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'cruncher-key');
+               $this->getStackInstance()->pushNamed('cruncher_test_unit', 'cruncher-key');
        }
 
        /**
@@ -304,9 +289,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function startKeyId () {
+       protected function startKeyId () {
                // Push the node name on the stacker
-               $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'key-id');
+               $this->getStackInstance()->pushNamed('cruncher_test_unit', 'key-id');
        }
 
        /**
@@ -314,9 +299,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function finishKeyId () {
+       protected function finishKeyId () {
                // Pop the last entry
-               $this->getStackerInstance()->popNamed('cruncher_test_unit');
+               $this->getStackInstance()->popNamed('cruncher_test_unit');
        }
 
        /**
@@ -324,9 +309,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function startKeyValue () {
+       protected function startKeyValue () {
                // Push the node name on the stacker
-               $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'key-value');
+               $this->getStackInstance()->pushNamed('cruncher_test_unit', 'key-value');
        }
 
        /**
@@ -334,9 +319,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function finishKeyValue () {
+       protected function finishKeyValue () {
                // Pop the last entry
-               $this->getStackerInstance()->popNamed('cruncher_test_unit');
+               $this->getStackInstance()->popNamed('cruncher_test_unit');
        }
 
        /**
@@ -344,9 +329,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function finishCruncherKey () {
+       protected function finishCruncherKey () {
                // Pop the last entry
-               $this->getStackerInstance()->popNamed('cruncher_test_unit');
+               $this->getStackInstance()->popNamed('cruncher_test_unit');
        }
 
        /**
@@ -354,9 +339,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function finishCruncherKeyList () {
+       protected function finishCruncherKeyList () {
                // Pop the last entry
-               $this->getStackerInstance()->popNamed('cruncher_test_unit');
+               $this->getStackInstance()->popNamed('cruncher_test_unit');
        }
 
        /**
@@ -364,9 +349,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function finishUnprocessedData () {
+       protected function finishUnprocessedData () {
                // Pop the last entry
-               $this->getStackerInstance()->popNamed('cruncher_test_unit');
+               $this->getStackInstance()->popNamed('cruncher_test_unit');
        }
 
        /**
@@ -374,9 +359,9 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         *
         * @return      void
         */
-       private function finishCruncherTestUnit () {
+       protected function finishTestUnit () {
                // Pop the last entry
-               $this->getStackerInstance()->popNamed('cruncher_test_unit');
+               $this->getStackInstance()->popNamed('cruncher_test_unit');
        }
 }