]> git.mxchange.org Git - hub.git/commitdiff
Added XML node 'accepted-object-types', used direct BaseHubSystem instead of 'self...
authorRoland Häder <roland@mxchange.org>
Tue, 21 Aug 2012 14:21:55 +0000 (14:21 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 21 Aug 2012 14:21:55 +0000 (14:21 +0000)
application/hub/main/streams/raw_data/input/class_RawDataInputStream.php
application/hub/main/template/requests/class_XmlRequestNodeListTemplateEngine.php

index a708c984e523dad38e92ee591a0162665618f1fa..41a4d474a8352f1d78861cdd88450db646e5c3e6 100644 (file)
@@ -69,10 +69,10 @@ class RawDataInputStream extends BaseStream implements InputStreamable {
                // Can it be validated?
                if ((strlen($data) % 4) != 0) {
                        // Length modulo 4 must be zero, else it is an invalid Base64 message
-                       throw new Base64EncodingModuloException(array($this, $data), self::EXCEPTION_BASE64_ENCODING_NOT_MODULO_4);
+                       throw new Base64EncodingModuloException(array($this, $data), BaseHubSystem::EXCEPTION_BASE64_ENCODING_NOT_MODULO_4);
                } elseif (!$this->isBase64Encoded($data)) {
                        // Is not a valid Base64-encoded message
-                       throw new Base64EncodingBadException(array($this, $data), self::EXCEPTION_BASE64_BAD_ENCODING);
+                       throw new Base64EncodingBadException(array($this, $data), BaseHubSystem::EXCEPTION_BASE64_BAD_ENCODING);
                } else {
                        // Decode the data with BASE64-encoding
                        $data = base64_decode($data);
index 968a5b928646fc76cde4d59bb6ebd1cb4bfc7d7f..32fc532fc5f6a07923778a581a8948cc0d665c9c 100644 (file)
@@ -27,7 +27,8 @@ class XmlRequestNodeListTemplateEngine extends BaseTemplateEngine implements Com
         * Main nodes in the XML tree
         */
        private $mainNodes = array(
-               'node-request-node-list'
+               'node-request-node-list',
+               'accepted-object-types'
        );
 
        /**
@@ -265,6 +266,26 @@ class XmlRequestNodeListTemplateEngine extends BaseTemplateEngine implements Com
                $this->getStackerInstance()->pushNamed('node_request_node_list', 'node-request-node-list');
        }
 
+       /**
+        * Starts the accepted-object-types
+        *
+        * @return      void
+        */
+       private function startAcceptedObjectTypes () {
+               // Push the node name on the stacker
+               $this->getStackerInstance()->pushNamed('node_request_node_list', 'accepted-object-types');
+       }
+
+       /**
+        * Finishes the accepted-object-types
+        *
+        * @return      void
+        */
+       private function finishAcceptedObjectTypes () {
+               // Pop the last entry
+               $this->getStackerInstance()->popNamed('node_request_node_list');
+       }
+
        /**
         * Finishes the node-request-node-list
         *