Method convertToClassName() and convertDashesToUnderscores() are now static as
authorRoland Haeder <roland@mxchange.org>
Wed, 27 May 2015 01:28:27 +0000 (03:28 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 27 May 2015 01:28:27 +0000 (03:28 +0200)
they don't use any object context.

Signed-off-by: Roland Häder <roland@mxchange.org>
16 files changed:
application/tests/class_ApplicationHelper.php
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/commands/html/class_HtmlLoginAreaCommand.php
inc/classes/main/criteria/class_BaseCriteria.php
inc/classes/main/feature/class_FrameworkFeature.php
inc/classes/main/helper/class_BaseHelper.php
inc/classes/main/request/html/class_HtmlRequest.php
inc/classes/main/resolver/action/class_BaseActionResolver.php
inc/classes/main/resolver/class_BaseResolver.php
inc/classes/main/resolver/command/class_BaseCommandResolver.php
inc/classes/main/resolver/controller/class_BaseControllerResolver.php
inc/classes/main/template/class_BaseTemplateEngine.php
inc/classes/main/template/image/class_ImageTemplateEngine.php
inc/classes/main/template/mail/class_MailTemplateEngine.php
inc/classes/main/template/menu/class_MenuTemplateEngine.php
inc/config/class_FrameworkConfiguration.php

index c8b407a5e251fdd9795050108959880ce7b8687f..7e0de1fc74a24c1f6ce5ec58e5dfaeb51353cc13 100644 (file)
@@ -157,7 +157,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                $responseType = self::getResponseTypeFromSystem();
 
                // Create a new request object
-               $requestInstance = ObjectFactory::createObjectByName($this->convertToClassName($response) . 'Request');
+               $requestInstance = ObjectFactory::createObjectByName(self::convertToClassName($response) . 'Request');
 
                // Remember request instance here
                $this->setRequestInstance($requestInstance);
@@ -170,7 +170,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                } // END - if
 
                // ... and a new response object
-               $responseClass = sprintf('%sResponse', $this->convertToClassName($response));
+               $responseClass = sprintf('%sResponse', self::convertToClassName($response));
                $responseInstance = ObjectFactory::createObjectByName($responseClass, array($this));
 
                // Remember response instance here
@@ -189,7 +189,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                } // END - if
 
                // Get a controller resolver
-               $resolverClass = $this->convertToClassName($this->getAppShortName() . '_' . $responseType . '_controller_resolver');
+               $resolverClass = self::convertToClassName($this->getAppShortName() . '_' . $responseType . '_controller_resolver');
                $resolverInstance = ObjectFactory::createObjectByName($resolverClass, array($commandName, $this));
 
                // Get a controller instance as well
index 85aeda63bfdf301cf09e5cf423314417ce47d7b4..d523e639f4ca8af2738eaff56989cb9dbb7c136d 100644 (file)
@@ -1891,12 +1891,12 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         * @param       $str            The string, what ever it is needs to be converted
         * @return      $className      Generated class name
         */
-       public function convertToClassName ($str) {
+       public static final function convertToClassName ($str) {
                // Init class name
                $className = '';
 
                // Convert all dashes in underscores
-               $str = $this->convertDashesToUnderscores($str);
+               $str = self::convertDashesToUnderscores($str);
 
                // Now use that underscores to get classname parts for hungarian style
                foreach (explode('_', $str) as $strPart) {
@@ -1914,7 +1914,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         * @param       $str    The string with maybe dashes inside
         * @return      $str    The converted string with no dashed, but underscores
         */
-       public final function convertDashesToUnderscores ($str) {
+       public static final function convertDashesToUnderscores ($str) {
                // Convert them all
                $str = str_replace('-', '_', $str);
 
@@ -2084,7 +2084,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($fieldName.':<pre>'.print_r($fieldArray, TRUE).'</pre>');
 
                // Convert dashes to underscore
-               $fieldName2 = $this->convertDashesToUnderscores($fieldName);
+               $fieldName2 = self::convertDashesToUnderscores($fieldName);
 
                // Does the field exist?
                if ($this->isFieldSet($fieldName)) {
@@ -2124,7 +2124,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . $this->__toString() . ':' . __LINE__ . '] fieldName=' . $fieldName . ',fieldArray=<pre>'.print_r($fieldArray, TRUE).'</pre>');
 
                // Convert dashes to underscore
-               $fieldName = $this->convertDashesToUnderscores($fieldName);
+               $fieldName = self::convertDashesToUnderscores($fieldName);
 
                // Determine it
                $isSet = isset($fieldArray[$fieldName]);
index 555f246c91f34b21895bb9e97c13ad668885fab1..e1d0eb95d193b821585c9ff4ad86b18d3eb33bc8 100644 (file)
@@ -171,7 +171,7 @@ class HtmlLoginAreaCommand extends BaseCommand implements Commandable {
                $applicationInstance = $registryInstance->getInstance('application');
 
                // Default action is the one from configuration
-               $this->actionName = $this->convertDashesToUnderscores($applicationInstance->getAppShortName()) . '_login_' . $this->getConfigInstance()->getConfigEntry('login_default_action');
+               $this->actionName = self::convertDashesToUnderscores($applicationInstance->getAppShortName()) . '_login_' . $this->getConfigInstance()->getConfigEntry('login_default_action');
 
                // Get "action" from request
                $actReq = $requestInstance->getRequestElement('action');
@@ -179,7 +179,7 @@ class HtmlLoginAreaCommand extends BaseCommand implements Commandable {
                // Do we have a "action" parameter set?
                if ((is_string($actReq)) && (!empty($actReq))) {
                        // Then use it with prefix
-                       $this->actionName = $this->convertDashesToUnderscores($applicationInstance->getAppShortName()) . '_login_' . $actReq;
+                       $this->actionName = self::convertDashesToUnderscores($applicationInstance->getAppShortName()) . '_login_' . $actReq;
                } // END - if
 
                // Get application instance
index 86e67857b732e7d4fe148a13b4a2d4556a26cf48..400ed06c4b7f46417a721930e5e43a03946782f4 100644 (file)
@@ -142,7 +142,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                assert((strpos($criteriaKey, 'my-') === FALSE) && (strpos($criteriaKey, 'my_') === FALSE));
 
                // Convert dashes to underscore
-               $criteriaKey = $this->convertDashesToUnderscores($criteriaKey);
+               $criteriaKey = self::convertDashesToUnderscores($criteriaKey);
 
                // "Walk" through all criterias
                foreach ($this->getGenericArray('criteria') as $criteriaType => $dummy) {
@@ -165,7 +165,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                assert((strpos($criteriaKey, 'my-') === FALSE) && (strpos($criteriaKey, 'my_') === FALSE) && (!is_bool($criteriaValue)));
 
                // Convert dashes to underscore
-               $criteriaKey = $this->convertDashesToUnderscores($criteriaKey);
+               $criteriaKey = self::convertDashesToUnderscores($criteriaKey);
 
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteriaValue=' . $criteriaValue);
@@ -190,7 +190,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteriaValue=' . $criteriaValue);
 
                // Add it
-               $this->pushValueToGenericArrayElement('criteria', 'choice', 'entries', $this->convertDashesToUnderscores($criteriaKey), (string) $criteriaValue);
+               $this->pushValueToGenericArrayElement('criteria', 'choice', 'entries', self::convertDashesToUnderscores($criteriaKey), (string) $criteriaValue);
        }
 
        /**
@@ -232,7 +232,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                assert((strpos($criteriaKey, 'my-') === FALSE) && (strpos($criteriaKey, 'my_') === FALSE));
 
                // Convert dashes to underscore
-               $criteriaKey = $this->convertDashesToUnderscores($criteriaKey);
+               $criteriaKey = self::convertDashesToUnderscores($criteriaKey);
 
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteria()=' . $this->countGenericArrayGroup('criteria', $criteriaType)));
@@ -290,7 +290,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        assert((strpos($key, 'my-') === FALSE) && (strpos($key, 'my_') === FALSE));
 
                        // Convert dashes to underscore
-                       $key = $this->convertDashesToUnderscores($key);
+                       $key = self::convertDashesToUnderscores($key);
 
                        // Then walk through all search criteria
                        foreach ($this->getGenericArrayKey('criteria', $criteriaType, 'entries') as $criteriaKey => $criteriaValue) {
@@ -298,7 +298,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                                assert((strpos($criteriaKey, 'my-') === FALSE) && (strpos($criteriaKey, 'my_') === FALSE) && (!is_bool($criteriaValue)));
 
                                // Convert dashes to underscore
-                               $criteriaKey = $this->convertDashesToUnderscores($criteriaKey);
+                               $criteriaKey = self::convertDashesToUnderscores($criteriaKey);
 
                                // Is the element found and does it match?
                                if (($key == $criteriaKey) && ($criteriaValue == $entry)) {
@@ -363,7 +363,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        assert(!is_array($criteriaValue));
 
                        // Convert dashes to underscore
-                       $criteriaKey = $this->convertDashesToUnderscores($criteriaKey);
+                       $criteriaKey = self::convertDashesToUnderscores($criteriaKey);
 
                        // Is the value in array or is $onlyKeys empty?
                        if ((isset($onlyKeys[$criteriaKey])) || (count($onlyKeys) == 0)) {
index 46d61ff03f2aad9aa6a8077d1a7e98642305bd7a..77f9431b4c71044567d3abdcb197856525f32c53 100644 (file)
@@ -140,7 +140,7 @@ class FrameworkFeature extends BaseFrameworkSystem implements Feature {
                assert(self::isFeatureAvailable($featureName));
 
                // Array for call-back
-               $callable = array(self::$enabledFeatures[$featureName]['instance'], $featureMethod);
+               $callable = array(self::$enabledFeatures[$featureName]['instance'], 'featureMethod' . self::convertToClassName($featureMethod));
 
                // So is the feature's method callable?
                if (!is_callable($callable)) {
index a8c513c074a963857c8909c86f73cfe8a28c3f45..c06f86fd6007ac4378984f4870c7e1be98f67cf4 100644 (file)
@@ -188,7 +188,7 @@ class BaseHelper extends BaseFrameworkSystem {
                //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($fieldName.'='.$fieldValue);
 
                // Now filter it through the value through the filter method
-               $filteredValue = call_user_func_array(array($this, 'doFilter' . $this->convertToClassName($filterMethod)), array($fieldValue));
+               $filteredValue = call_user_func_array(array($this, 'doFilter' . self::convertToClassName($filterMethod)), array($fieldValue));
 
                // Assign it with a template variable
                $this->getTemplateInstance()->assignVariable('block_' . $fieldName, $filteredValue);
index e808c7109776f1b9d1557b63cac3c5132c362744..edf9c9a412c00e9268f8bc151dcf1631a110858f 100644 (file)
@@ -102,7 +102,7 @@ class HtmlRequest extends BaseRequest implements Requestable {
                $headerValue = NULL;
 
                // Construct the name
-               $name = 'HTTP_' . strtoupper($this->convertDashesToUnderscores($headerName));
+               $name = 'HTTP_' . strtoupper(self::convertDashesToUnderscores($headerName));
 
                // Does this header exist?
                if (isset($_SERVER[$name])) {
index c8daf0011809efbf66c25c04b92f5976d3001276..44836e9d52be1000b3b51f6c4097f78a448f11d4 100644 (file)
@@ -75,7 +75,7 @@ class BaseActionResolver extends BaseResolver {
                } // END - if
 
                // Create class name
-               $className = $this->getCapitalizedClassPrefix() . $this->convertToClassName($actionName) . 'Action';
+               $className = $this->getCapitalizedClassPrefix() . self::convertToClassName($actionName) . 'Action';
 
                // Now, let us create the full name of the action class
                $this->setClassName($className);
@@ -103,7 +103,7 @@ class BaseActionResolver extends BaseResolver {
                $actionInstance = NULL;
 
                // Create action class name
-               $className = $this->getCapitalizedClassPrefix() . $this->convertToClassName($this->getActionName()) . 'Action';
+               $className = $this->getCapitalizedClassPrefix() . self::convertToClassName($this->getActionName()) . 'Action';
 
                // ... and set it
                $this->setClassName($className);
index 1e9274f2654dca2d69073544e2cc3c2cacd02ed8..e6582f1a6fc5cca54975c77008d3891aceec96f3 100644 (file)
@@ -73,7 +73,7 @@ class BaseResolver extends BaseFrameworkSystem {
                $className = $this->getClassPrefix();
 
                // And capitalize it
-               $className = $this->convertToClassName($className);
+               $className = self::convertToClassName($className);
 
                // Return it
                return $className;
index c750238d5e36ca67bf34a160906b7eb7dcd85109..ff444fd725a8e3c226a0df6d03564086d01fdbfc 100644 (file)
@@ -46,7 +46,7 @@ class BaseCommandResolver extends BaseResolver {
                $commandInstance = NULL;
 
                // Create class name
-               $className = $this->getCapitalizedClassPrefix() . $this->convertToClassName($commandName) . 'Command';
+               $className = $this->getCapitalizedClassPrefix() . self::convertToClassName($commandName) . 'Command';
 
                // Create command class name
                $this->setClassName($className);
@@ -157,7 +157,7 @@ class BaseCommandResolver extends BaseResolver {
                } // END - if
 
                // Create the full class name
-               $className = $this->getCapitalizedClassPrefix() . $this->convertToClassName($commandName) . 'Command';
+               $className = $this->getCapitalizedClassPrefix() . self::convertToClassName($commandName) . 'Command';
 
                // Now, let us create the full name of the command class
                $this->setClassName($className);
index 5091c750e0a835eb8ab3328065eae5b6c650f3ae..5615515afc62531a2b84a2e158902b21e40fc5be 100644 (file)
@@ -57,7 +57,7 @@ class BaseControllerResolver extends BaseResolver {
                //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BEFORE: controller=' . $controllerName);
                if ($controllerName != $defaultController) {
                        // Create controller class name
-                       $className = $this->getCapitalizedClassPrefix() . $this->convertToClassName($controllerName) . 'Controller';
+                       $className = $this->getCapitalizedClassPrefix() . self::convertToClassName($controllerName) . 'Controller';
 
                        // ... and set it
                        $this->setClassName($className);
@@ -118,7 +118,7 @@ class BaseControllerResolver extends BaseResolver {
                } // END - if
 
                // Create class name
-               $className = $this->getCapitalizedClassPrefix() . $this->convertToClassName($controllerName) . 'Controller';
+               $className = $this->getCapitalizedClassPrefix() . self::convertToClassName($controllerName) . 'Controller';
 
                // Now, let us create the full name of the controller class
                $this->setClassName($className);
index 69b86079624860a2281e19fa35cebf38780e06b1..012e46734ad2532a679aa58fed365fe54c13c0dc 100644 (file)
@@ -178,7 +178,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        private function getVariableIndex ($variableName, $variableGroup = NULL) {
                // Replace all dashes to underscores to match variables with configuration entries
-               $variableName = trim($this->convertDashesToUnderscores($variableName));
+               $variableName = trim(self::convertDashesToUnderscores($variableName));
 
                // First everything is not found
                $found = FALSE;
@@ -253,7 +253,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        protected function readVariable ($variableName, $variableGroup = NULL) {
                // Replace all dashes to underscores to match variables with configuration entries
-               $variableName = trim($this->convertDashesToUnderscores($variableName));
+               $variableName = trim(self::convertDashesToUnderscores($variableName));
 
                // First everything is not found
                $content = NULL;
@@ -341,7 +341,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        public function addGroupVariable ($variableName, $value) {
                // Replace all dashes to underscores to match variables with configuration entries
-               $variableName = trim($this->convertDashesToUnderscores($variableName));
+               $variableName = trim(self::convertDashesToUnderscores($variableName));
 
                // Debug message
                //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__.': group=' . $this->currGroup . ', variableName=' . $variableName . ', value=' . $value);
@@ -378,7 +378,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        private function modifyVariable ($variableName, $value) {
                // Replace all dashes to underscores to match variables with configuration entries
-               $variableName = trim($this->convertDashesToUnderscores($variableName));
+               $variableName = trim(self::convertDashesToUnderscores($variableName));
 
                // Get index for variable
                $index = $this->getVariableIndex($variableName);
@@ -417,7 +417,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        protected function setVariable ($variableGroup, $variableName, $value) {
                // Replace all dashes to underscores to match variables with configuration entries
-               $variableName = trim($this->convertDashesToUnderscores($variableName));
+               $variableName = trim(self::convertDashesToUnderscores($variableName));
 
                // Get index for variable
                $index = $this->getVariableIndex($variableName);
@@ -448,7 +448,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        private function generateVariableArray ($variableName, $value) {
                // Replace all dashes to underscores to match variables with configuration entries
-               $variableName = trim($this->convertDashesToUnderscores($variableName));
+               $variableName = trim(self::convertDashesToUnderscores($variableName));
 
                // Generate the temporary array
                $varData = array(
@@ -749,7 +749,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        private function assignTemplateVariable ($variableName, $var) {
                // Replace all dashes to underscores to match variables with configuration entries
-               $variableName = trim($this->convertDashesToUnderscores($variableName));
+               $variableName = trim(self::convertDashesToUnderscores($variableName));
 
                // Debug message
                //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: variableName=' . $variableName . ',variableName=' . $variableName);
@@ -967,7 +967,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                // Search for all variables
                foreach ($varMatches[1] as $key => $var) {
                        // Replace all dashes to underscores to match variables with configuration entries
-                       $var = trim($this->convertDashesToUnderscores($var));
+                       $var = trim(self::convertDashesToUnderscores($var));
 
                        // Debug message
                        self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:key=' . $key . ',var=' . $var);
@@ -1110,7 +1110,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        public final function assignVariable ($variableName, $value) {
                // Replace all dashes to underscores to match variables with configuration entries
-               $variableName = trim($this->convertDashesToUnderscores($variableName));
+               $variableName = trim(self::convertDashesToUnderscores($variableName));
 
                // Empty variable found?
                if (empty($variableName)) {
@@ -1178,7 +1178,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        public function assignConfigVariable ($variableName) {
                // Replace all dashes to underscores to match variables with configuration entries
-               $variableName = trim($this->convertDashesToUnderscores($variableName));
+               $variableName = trim(self::convertDashesToUnderscores($variableName));
 
                // Sweet and simple...
                //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: variableName=' . $variableName . ',getConfigEntry()=' . $this->getConfigInstance()->getConfigEntry($variableName));
@@ -1448,7 +1448,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                // Is this view helper loaded?
                if (!isset($this->helpers[$helperName])) {
                        // Create a class name
-                       $className = $this->convertToClassName($helperName) . 'ViewHelper';
+                       $className = self::convertToClassName($helperName) . 'ViewHelper';
 
                        // Generate new instance
                        $this->helpers[$helperName] = ObjectFactory::createObjectByName($className);
index 5c56f3671cb5a79f0b641cc23345fe794bcc9d4c..3b7b8da073dbf88f8593e93965038c55bb1973f5 100644 (file)
@@ -163,10 +163,10 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
                //* DEBUG: */ echo "START: &gt;".$element."&lt;<br />\n";
                if (in_array($element, $this->mainNodes)) {
                        // Okay, main node found!
-                       $methodName = 'setImage' . $this->convertToClassName($element);
+                       $methodName = 'setImage' . self::convertToClassName($element);
                } elseif (in_array($element, $this->subNodes)) {
                        // Sub node found
-                       $methodName = 'setImageProperty' . $this->convertToClassName($element);
+                       $methodName = 'setImageProperty' . self::convertToClassName($element);
                } elseif ($element != 'image') {
                        // Invalid node name found
                        throw new InvalidXmlNodeException(array($this, $element, $attributes), XmlParser::EXCEPTION_XML_NODE_UNKNOWN);
@@ -200,7 +200,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
                }
 
                // Construct method name
-               $methodName = 'finish' . $this->convertToClassName($nodeName);
+               $methodName = 'finish' . self::convertToClassName($nodeName);
 
                // Call the corresponding method
                call_user_func_array(array($this->getImageInstance(), $methodName), array());
@@ -252,7 +252,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
                $imageType = $this->compileRawCode($imageType);
 
                // Now make a class name of it
-               $className = $this->convertToClassName($imageType.'_image');
+               $className = self::convertToClassName($imageType.'_image');
 
                // And try to initiate it
                $this->setImageInstance(ObjectFactory::createObjectByName($className, array($this)));
index 7c66d76e0706d3522e026563fbbfb3f19f6935d9..90ae7ccdddb3b457c083acb2ff9ae2ea8a2cc6c8 100644 (file)
@@ -157,10 +157,10 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                //* DEBUG: */ echo "START: &gt;".$element."&lt;<br />\n";
                if (in_array($element, $this->getMainNodes())) {
                        // Okay, main node found!
-                       $methodName = 'setEmail' . $this->convertToClassName($element);
+                       $methodName = 'setEmail' . self::convertToClassName($element);
                } elseif (in_array($element, $this->getSubNodes())) {
                        // Sub node found
-                       $methodName = 'setEmailProperty' . $this->convertToClassName($element);
+                       $methodName = 'setEmailProperty' . self::convertToClassName($element);
                } elseif ($element != 'text-mail') {
                        // Invalid node name found
                        throw new InvalidXmlNodeException(array($this, $element, $attributes), XmlParser::EXCEPTION_XML_NODE_UNKNOWN);
@@ -194,7 +194,7 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                }
 
                // Construct method name
-               $methodName = 'finish' . $this->convertToClassName($nodeName);
+               $methodName = 'finish' . self::convertToClassName($nodeName);
 
                // Call the corresponding method
                call_user_func_array(array($this, $methodName), array());
index 62997fa86258deb1507480cd99bc8a86ef558af2..f0237b1eb4d339367e08fb214571654932cf2031 100644 (file)
@@ -252,13 +252,13 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                //* DEBUG: */ echo "START: &gt;".$element."&lt;<br />\n";
                if (in_array($element, $this->getMainNodes())) {
                        // Okay, main node found!
-                       $methodName = 'start' . $this->convertToClassName($element);
+                       $methodName = 'start' . self::convertToClassName($element);
 
                        // Set it
                        $this->setCurrMainNode($element);
                } elseif (in_array($element, $this->getSubNodes())) {
                        // Sub node found
-                       $methodName = 'start' . $this->convertToClassName($element);
+                       $methodName = 'start' . self::convertToClassName($element);
                } elseif ($element != 'menu') {
                        // Invalid node name found
                        throw new InvalidXmlNodeException(array($this, $element, $attributes), XmlParser::EXCEPTION_XML_NODE_UNKNOWN);
@@ -289,7 +289,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                } // END - if
 
                // Construct method name
-               $methodName = 'finish' . $this->convertToClassName($nodeName);
+               $methodName = 'finish' . self::convertToClassName($nodeName);
 
                // Call the corresponding method
                //* DEBUG: */ echo "call: ".$methodName."<br />\n";
index d6ff28a24da1226428e14824e42cf8e6ccfb462d..5a206d5c5572af41f1aea0bf9808925eab837ff5 100644 (file)
@@ -153,7 +153,7 @@ class FrameworkConfiguration implements Registerable {
         */
        public function getConfigEntry ($configKey) {
                // Convert dashes to underscore
-               $configKey = $this->convertDashesToUnderscores($configKey);
+               $configKey = self::convertDashesToUnderscores($configKey);
 
                // Is a valid configuration key provided?
                if (empty($configKey)) {
@@ -179,7 +179,7 @@ class FrameworkConfiguration implements Registerable {
         */
        public final function setConfigEntry ($configKey, $configValue) {
                // Cast to string
-               $configKey = $this->convertDashesToUnderscores($configKey);
+               $configKey = self::convertDashesToUnderscores($configKey);
 
                // Is a valid configuration key key provided?
                if ((empty($configKey)) || (!is_string($configKey))) {
@@ -208,7 +208,7 @@ class FrameworkConfiguration implements Registerable {
         */
        public final function unsetConfigEntry ($configKey) {
                // Convert dashes to underscore
-               $configKey = $this->convertDashesToUnderscores($configKey);
+               $configKey = self::convertDashesToUnderscores($configKey);
 
                // Is the configuration key there?
                if (!$this->isConfigurationEntrySet($configKey)) {