From 5fee10d27a56e041113acda01f2dbfd5d5ed3ad5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 22 Aug 2012 20:59:17 +0000 Subject: [PATCH] Renamed again a bunch of methods to generic 'readXmlData' name --- .../hub/main/filter/class_BaseHubFilter.php | 5 +---- .../class_XmlAnnouncementTemplateEngine.php | 15 --------------- .../class_XmlAnnouncementAnswerTemplateEngine.php | 15 --------------- .../main/template/class_BaseXmlTemplateEngine.php | 15 +++++++++++++++ .../class_XmlSelfConnectTemplateEngine.php | 15 --------------- 5 files changed, 16 insertions(+), 49 deletions(-) diff --git a/application/hub/main/filter/class_BaseHubFilter.php b/application/hub/main/filter/class_BaseHubFilter.php index 933be692c..5cf7f1967 100644 --- a/application/hub/main/filter/class_BaseHubFilter.php +++ b/application/hub/main/filter/class_BaseHubFilter.php @@ -68,11 +68,8 @@ class BaseHubFilter extends BaseFilter { * inside the message, the above method call will cause exceptions. */ foreach ($this->dataXmlNodes as $key => $dummy) { - // Generate method name - $methodName = 'read' . $this->convertToClassName($messageType) . 'Data'; - // Call it - $value = call_user_func(array($templateInstance, $methodName), $key); + $templateInstance->readXmlData($key); /* * If value is NULL, a variable hasn't been found. This could mean diff --git a/application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php b/application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php index 11e7e759d..dde53d35e 100644 --- a/application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php +++ b/application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php @@ -119,21 +119,6 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com parent::assignVariable($this->getStackerInstance()->getNamed('announcement'), $characters); } - /** - * Read announcement variables by calling readVariable() with 'general' as - * variable stack. - * - * @param $key Key to read from - * @return $value Value from variable - */ - public function readAnnouncementData ($key) { - // Read the variable - $value = parent::readVariable($key, 'general'); - - // Return value - return $value; - } - /** * Getter for cache file (FQFN) * diff --git a/application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php b/application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php index e5603fcca..6c6134183 100644 --- a/application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php +++ b/application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php @@ -126,21 +126,6 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen parent::assignVariable($this->getStackerInstance()->getNamed('announcement_answer'), $characters); } - /** - * Read announcement-answer variables by calling readVariable() with 'general' as - * variable stack. - * - * @param $key Key to read from - * @return $value Value from variable - */ - public function readAnnouncementAnswerData ($key) { - // Read the variable - $value = parent::readVariable($key, 'general'); - - // Return value - return $value; - } - /** * Getter for cache file (FQFN) * diff --git a/application/hub/main/template/class_BaseXmlTemplateEngine.php b/application/hub/main/template/class_BaseXmlTemplateEngine.php index 2086623d9..04af15dfc 100644 --- a/application/hub/main/template/class_BaseXmlTemplateEngine.php +++ b/application/hub/main/template/class_BaseXmlTemplateEngine.php @@ -177,6 +177,21 @@ class BaseXmlTemplateEngine extends BaseTemplateEngine { return $this->subNodes; } + /** + * Read XML variables by calling readVariable() with 'general' as + * variable stack. + * + * @param $key Key to read from + * @return $value Value from variable + */ + public function readXmlData ($key) { + // Read the variable + $value = parent::readVariable($key, 'general'); + + // Return value + return $value; + } + /** * Handles the template dependency for given node * diff --git a/application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php b/application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php index 3c0a786fb..da8df035e 100644 --- a/application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php +++ b/application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php @@ -108,21 +108,6 @@ class XmlSelfConnectTemplateEngine extends BaseXmlTemplateEngine implements Comp 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; - } - /** * Getter for cache file (FQFN) * -- 2.39.2