* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class XmlSelfConnectTemplateEngine extends BaseTemplateEngine implements CompileableTemplate, Registerable {
+ /**
+ * Data nodes
+ */
+ const SELF_CONNECT_DATA_NODE_ID = 'node-id';
+ const SELF_CONNECT_DATA_SESSION_ID = 'session-id';
+
/**
* Main nodes in the XML tree
*/
/**
* Sub nodes in the XML tree
*/
- private $subNodes = array(
- 'self-connect-data',
- 'node-id',
- 'session-id'
- );
+ private $subNodes = array();
/**
* Current main node
protected function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
+
+ // Init array
+ $this->subNodes = array(
+ 'self-connect-data',
+ self::SELF_CONNECT_DATA_NODE_ID,
+ self::SELF_CONNECT_DATA_SESSION_ID
+ );
}
/**
*/
private function startNodeId () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('self_connect', 'node-id');
+ $this->getStackerInstance()->pushNamed('self_connect', self::SELF_CONNECT_DATA_NODE_ID);
}
/**
*/
private function startSessionId () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('self_connect', 'session-id');
+ $this->getStackerInstance()->pushNamed('self_connect', self::SELF_CONNECT_DATA_SESSION_ID);
}
/**