* Sub nodes in the XML tree
*/
private $subNodes = array(
+ 'meta-data',
+ 'global-project-identifier',
+ 'cipher',
+ 'cipher-function',
+ 'cipher-name',
+ 'unprocessed-data',
+ 'cruncher-key-list',
+ 'cruncher-key',
+ 'key-id',
+ 'key-value'
);
/**
* @param $resource XML parser resource (currently ignored)
* @param $characters Characters to handle
* @return void
- * @todo Find something useful with this!
*/
public function characterHandler ($resource, $characters) {
// Trim all spaces away
return false;
} // END - if
- // Get current XML node name as an array index
- $nodeName = $this->getStackerInstance()->getNamed('cruncher_test_unit');
-
- $this->partialStub('TODO: Do something with the gathered data.');
+ // 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);
}
/**
$this->getStackerInstance()->pushNamed('cruncher_test_unit', 'cruncher-test-unit');
}
+ /**
+ * Starts the meta-data
+ *
+ * @return void
+ */
+ private function startMetaData () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'meta-data');
+ }
+
+ /**
+ * Starts the global-project-identifier
+ *
+ * @return void
+ */
+ private function startGlobalProjectIdentifier () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'global-project-identifier');
+ }
+
+ /**
+ * Finishes the global-project-identifier
+ *
+ * @return void
+ */
+ private function finishGlobalProjectIdentifier () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
+ /**
+ * Starts the cipher
+ *
+ * @return void
+ */
+ private function startCipher () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'cipher');
+ }
+
+ /**
+ * Starts the cipher-function
+ *
+ * @return void
+ */
+ private function startCipherFunction () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'cipher-function');
+ }
+
+ /**
+ * Finishes the cipher-function
+ *
+ * @return void
+ */
+ private function finishCipherFunction () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
+ /**
+ * Starts the cipher-name
+ *
+ * @return void
+ */
+ private function startCipherName () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'cipher-name');
+ }
+
+ /**
+ * Finishes the cipher-name
+ *
+ * @return void
+ */
+ private function finishCipherName () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
+ /**
+ * Finishes the cipher
+ *
+ * @return void
+ */
+ private function finishCipher () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
+ /**
+ * Finishes the meta-data
+ *
+ * @return void
+ */
+ private function finishMetaData () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
+ /**
+ * Starts the unprocessed-data
+ *
+ * @return void
+ */
+ private function startUnprocessedData () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'unprocessed-data');
+ }
+
+ /**
+ * Starts the cruncher-key-list
+ *
+ * @param $keyCount Count of keys in this test unit
+ * @return void
+ * @todo Handle $keyCount
+ */
+ private function startCruncherKeyList ($keyCount) {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'cruncher-key-list');
+ }
+
+ /**
+ * Starts the cruncher-key
+ *
+ * @return void
+ */
+ private function startCruncherKey () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'cruncher-key');
+ }
+
+ /**
+ * Starts the key-id
+ *
+ * @return void
+ */
+ private function startKeyId () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'key-id');
+ }
+
+ /**
+ * Finishes the key-id
+ *
+ * @return void
+ */
+ private function finishKeyId () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
+ /**
+ * Starts the key-value
+ *
+ * @return void
+ */
+ private function startKeyValue () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'key-value');
+ }
+
+ /**
+ * Finishes the key-value
+ *
+ * @return void
+ */
+ private function finishKeyValue () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
+ /**
+ * Finishes the cruncher-key
+ *
+ * @return void
+ */
+ private function finishCruncherKey () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
+ /**
+ * Finishes the cruncher-key-list
+ *
+ * @return void
+ */
+ private function finishCruncherKeyList () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
+ /**
+ * Finishes the unprocessed-data
+ *
+ * @return void
+ */
+ private function finishUnprocessedData () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
/**
* Finishes the test-unit
*