/**
* An SelfConnect 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) 2007, 2008 Roland Haeder, 2009 - 2015 Hub 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 array
- $this->subNodes = array(
+ $this->setSubNodes(array(
'self-connect-data',
self::SELF_CONNECT_DATA_NODE_ID,
self::SELF_CONNECT_DATA_SESSION_ID
- );
+ ));
}
/**
return $templateInstance;
}
- /**
- * Load a specified self-connect template into the engine
- *
- * @param $template The self-connect template we shall load which is
- * located in 'self_connect' by default
- * @return void
- */
- public function loadSelfConnectTemplate ($template = 'self_connect') {
- // Set template type
- $this->setTemplateType($this->getConfigInstance()->getConfigEntry('node_self_connect_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('self_connect'), $characters);
- }
-
- /**
- * Read self-connect variables by calling readVariable() with 'general' as
- * variable stack.
- *
- * @param $key Key to read from
- * @return $value Value from variable
- */
- public function readSelfConnectData ($key) {
- // Read the variable
- $value = parent::readVariable($key, 'general');
-
- // Return value
- return $value;
+ parent::assignVariable($this->getStackInstance()->getNamed('node_self_connect'), $characters);
}
/**
*/
protected function startSelfConnect () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('self_connect', 'self-connect');
+ $this->getStackInstance()->pushNamed('node_self_connect', 'self-connect');
}
/**
*/
protected function startSelfConnectData () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('self_connect', 'self-connect-data');
+ $this->getStackInstance()->pushNamed('node_self_connect', 'self-connect-data');
}
/**
*/
protected function startNodeId () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('self_connect', self::SELF_CONNECT_DATA_NODE_ID);
+ $this->getStackInstance()->pushNamed('node_self_connect', self::SELF_CONNECT_DATA_NODE_ID);
}
/**
*/
protected function startSessionId () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('self_connect', self::SELF_CONNECT_DATA_SESSION_ID);
+ $this->getStackInstance()->pushNamed('node_self_connect', self::SELF_CONNECT_DATA_SESSION_ID);
}
/**
*/
protected function finishSessionId () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('self_connect');
+ $this->getStackInstance()->popNamed('node_self_connect');
}
/**
*/
protected function finishNodeId () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('self_connect');
+ $this->getStackInstance()->popNamed('node_self_connect');
}
/**
*/
protected function finishSelfConnectData () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('self_connect');
+ $this->getStackInstance()->popNamed('node_self_connect');
}
/**
*/
protected function finishSelfConnect () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('self_connect');
+ $this->getStackInstance()->popNamed('node_self_connect');
}
}