<?php
/**
- * An ??? template engine class for XML templates
+ * An AnnouncementAnswer template engine class for XML templates
*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
const ANNOUNCEMENT_DATA_INTERNAL_IP = 'my-internal-ip';
const ANNOUNCEMENT_DATA_TCP_PORT = 'my-tcp-port';
const ANNOUNCEMENT_DATA_UDP_PORT = 'my-udp-port';
- const ANNOUNCEMENT_DATA_ANSWER_STATUS = 'answer-status';
/**
* Protected constructor
'your-external-ip',
'your-internal-ip',
'your-session-id',
- // Answer status (code)
- self::ANNOUNCEMENT_DATA_ANSWER_STATUS
);
}
return $templateInstance;
}
- /**
- * Load a specified announcement-answer template into the engine
- *
- * @param $template The announcement-answer template we shall load which is
- * located in 'announcement_answer' by default
- * @return void
- */
- public function loadAnnouncementAnswerTemplate ($template = 'announcement_answer') {
- // Set template type
- $this->setTemplateType($this->getConfigInstance()->getConfigEntry('node_announcement_answer_template_type'));
-
- // Load the special template
- $this->loadTemplate($template);
- }
-
/**
* Currently not used
*
* Assign the found characters to variable and use the last entry from
* stack as the name.
*/
- parent::assignVariable($this->getStackerInstance()->getNamed('announcement_answer'), $characters);
+ parent::assignVariable($this->getStackerInstance()->getNamed('node_announcement_answer'), $characters);
}
/**
*/
protected function startAnnouncementAnswer () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', 'announcement-answer');
+ $this->getStackerInstance()->pushNamed('node_announcement_answer', 'announcement-answer');
}
/**
*/
protected function startMyData () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', 'my-data');
+ $this->getStackerInstance()->pushNamed('node_announcement_answer', 'my-data');
}
/**
*/
protected function startMyExternalIp () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', self::ANNOUNCEMENT_DATA_EXTERNAL_IP);
+ $this->getStackerInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_EXTERNAL_IP);
}
/**
*/
protected function startMyInternalIp () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', self::ANNOUNCEMENT_DATA_INTERNAL_IP);
+ $this->getStackerInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_INTERNAL_IP);
}
/**
*/
protected function startMyTcpPort () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', self::ANNOUNCEMENT_DATA_TCP_PORT);
+ $this->getStackerInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_TCP_PORT);
}
/**
*/
protected function startMyUdpPort () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', self::ANNOUNCEMENT_DATA_UDP_PORT);
+ $this->getStackerInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_UDP_PORT);
}
/**
*/
protected function startMySessionId () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', self::ANNOUNCEMENT_DATA_SESSION_ID);
+ $this->getStackerInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_SESSION_ID);
}
/**
*/
protected function startMyStatus () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', self::ANNOUNCEMENT_DATA_NODE_STATUS);
+ $this->getStackerInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_NODE_STATUS);
}
/**
*/
protected function finishMyStatus () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('announcement_answer');
+ $this->getStackerInstance()->popNamed('node_announcement_answer');
}
/**
*/
protected function finishMySessionId () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('announcement_answer');
+ $this->getStackerInstance()->popNamed('node_announcement_answer');
}
/**
*/
protected function finishMyUdpPort () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('announcement_answer');
+ $this->getStackerInstance()->popNamed('node_announcement_answer');
}
/**
*/
protected function finishMyTcpPort () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('announcement_answer');
+ $this->getStackerInstance()->popNamed('node_announcement_answer');
}
/**
*/
protected function finishMyInternalIp () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('announcement_answer');
+ $this->getStackerInstance()->popNamed('node_announcement_answer');
}
/**
*/
protected function finishMyExternalIp () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('announcement_answer');
+ $this->getStackerInstance()->popNamed('node_announcement_answer');
}
/**
*/
protected function finishMyData () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('announcement_answer');
+ $this->getStackerInstance()->popNamed('node_announcement_answer');
}
/**
*/
protected function startYourData () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', 'your-data');
+ $this->getStackerInstance()->pushNamed('node_announcement_answer', 'your-data');
}
/**
*/
protected function startYourExternalIp () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', 'your-external-ip');
+ $this->getStackerInstance()->pushNamed('node_announcement_answer', 'your-external-ip');
}
/**
*/
protected function startYourInternalIp () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', 'your-internal-ip');
+ $this->getStackerInstance()->pushNamed('node_announcement_answer', 'your-internal-ip');
}
/**
*/
protected function startYourSessionId () {
// Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', 'your-session-id');
+ $this->getStackerInstance()->pushNamed('node_announcement_answer', 'your-session-id');
}
/**
*/
protected function finishYourSessionId () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('announcement_answer');
+ $this->getStackerInstance()->popNamed('node_announcement_answer');
}
/**
*/
protected function finishYourInternalIp () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('announcement_answer');
+ $this->getStackerInstance()->popNamed('node_announcement_answer');
}
/**
*/
protected function finishYourExternalIp () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('announcement_answer');
+ $this->getStackerInstance()->popNamed('node_announcement_answer');
}
/**
*/
protected function finishYourData () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('announcement_answer');
- }
-
- /**
- * Starts the answer-status
- *
- * @return void
- */
- protected function startAnswerStatus () {
- // Push the node name on the stacker
- $this->getStackerInstance()->pushNamed('announcement_answer', self::ANNOUNCEMENT_DATA_ANSWER_STATUS);
- }
-
- /**
- * Finishes the answer-status
- *
- * @return void
- */
- protected function finishAnswerStatus () {
- // Pop the last entry
- $this->getStackerInstance()->popNamed('announcement_answer');
+ $this->getStackerInstance()->popNamed('node_announcement_answer');
}
/**
*/
protected function finishAnnouncementAnswer () {
// Pop the last entry
- $this->getStackerInstance()->popNamed('announcement_answer');
+ $this->getStackerInstance()->popNamed('node_announcement_answer');
}
}