]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/template/requests/class_XmlRequestNodeListTemplateEngine.php
Introduced new factory for object type registries, added a very simple way to get...
[hub.git] / application / hub / main / template / requests / class_XmlRequestNodeListTemplateEngine.php
index 87a86cf8f3ca44eb2a2683ad5e65832569094404..eddc59feb12dba2472f11100c967050c6e895bf7 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class XmlRequestNodeListTemplateEngine extends BaseTemplateEngine implements CompileableTemplate, Registerable {
+       // Constants for array elements
+       const REQUEST_DATA_ACCEPTED_OBJECT_TYPES = 'accepted-object-types';
+       const REQUEST_DATA_SESSION_ID            = 'session-id';
+
        /**
         * Main nodes in the XML tree
         */
@@ -34,7 +38,8 @@ class XmlRequestNodeListTemplateEngine extends BaseTemplateEngine implements Com
         * Sub nodes in the XML tree
         */
        private $subNodes = array(
-               'accepted-object-types'
+               self::REQUEST_DATA_ACCEPTED_OBJECT_TYPES,
+               self::REQUEST_DATA_SESSION_ID
        );
 
        /**
@@ -271,7 +276,27 @@ class XmlRequestNodeListTemplateEngine extends BaseTemplateEngine implements Com
         */
        private function startAcceptedObjectTypes () {
                // Push the node name on the stacker
-               $this->getStackerInstance()->pushNamed('node_request_node_list', 'accepted-object-types');
+               $this->getStackerInstance()->pushNamed('node_request_node_list', self::REQUEST_DATA_ACCEPTED_OBJECT_TYPES);
+       }
+
+       /**
+        * Starts the session-id
+        *
+        * @return      void
+        */
+       private function startSessionId () {
+               // Push the node name on the stacker
+               $this->getStackerInstance()->pushNamed('node_request_node_list', self::REQUEST_DATA_SESSION_ID);
+       }
+
+       /**
+        * Finishes the session-id
+        *
+        * @return      void
+        */
+       private function finishSessionId () {
+               // Pop the last entry
+               $this->getStackerInstance()->popNamed('node_request_node_list');
        }
 
        /**