/**
* 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
parent::__construct(__CLASS__);
// Init sub nodes
- $this->subNodes = array(
+ $this->setSubNodes(array(
'meta-data',
'global-project-identifier',
'test-unit-created',
'cruncher-key',
'key-id',
'key-value'
- );
+ ));
}
/**
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
*
// 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);
}
/**
*
* @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');
}
/**
*
* @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');
}
/**
*
* @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');
}
/**
*
* @return void
*/
- private function finishGlobalProjectIdentifier () {
+ protected function finishGlobalProjectIdentifier () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ $this->getStackInstance()->popNamed('cruncher_test_unit');
}
/**
*
* @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');
}
/**
*
* @return void
*/
- private function finishTestUnitCreated () {
+ protected function finishTestUnitCreated () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ $this->getStackInstance()->popNamed('cruncher_test_unit');
}
/**
*
* @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');
}
/**
*
* @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');
}
/**
*
* @return void
*/
- private function finishCipherFunction () {
+ protected function finishCipherFunction () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ $this->getStackInstance()->popNamed('cruncher_test_unit');
}
/**
*
* @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');
}
/**
*
* @return void
*/
- private function finishCipherName () {
+ protected function finishCipherName () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ $this->getStackInstance()->popNamed('cruncher_test_unit');
}
/**
*
* @return void
*/
- private function finishCipher () {
+ protected function finishCipher () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ $this->getStackInstance()->popNamed('cruncher_test_unit');
}
/**
*
* @return void
*/
- private function finishMetaData () {
+ protected function finishMetaData () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ $this->getStackInstance()->popNamed('cruncher_test_unit');
}
/**
*
* @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');
}
/**
*
* @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');
}
/**
*
* @return void
*/
- private function finishEncryptedMessage () {
+ protected function finishEncryptedMessage () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ $this->getStackInstance()->popNamed('cruncher_test_unit');
}
/**
* @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');
}
/**
*
* @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');
}
/**
*
* @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');
}
/**
*
* @return void
*/
- private function finishKeyId () {
+ protected function finishKeyId () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ $this->getStackInstance()->popNamed('cruncher_test_unit');
}
/**
*
* @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');
}
/**
*
* @return void
*/
- private function finishKeyValue () {
+ protected function finishKeyValue () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ $this->getStackInstance()->popNamed('cruncher_test_unit');
}
/**
*
* @return void
*/
- private function finishCruncherKey () {
+ protected function finishCruncherKey () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ $this->getStackInstance()->popNamed('cruncher_test_unit');
}
/**
*
* @return void
*/
- private function finishCruncherKeyList () {
+ protected function finishCruncherKeyList () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ $this->getStackInstance()->popNamed('cruncher_test_unit');
}
/**
*
* @return void
*/
- private function finishUnprocessedData () {
+ protected function finishUnprocessedData () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ $this->getStackInstance()->popNamed('cruncher_test_unit');
}
/**
*
* @return void
*/
- private function finishCruncherTestUnit () {
+ protected function finishTestUnit () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ $this->getStackInstance()->popNamed('cruncher_test_unit');
}
}