]> git.mxchange.org Git - hub.git/commitdiff
Removed obsolete parameter 'applicationInstance' from all template engines
authorRoland Häder <roland@mxchange.org>
Mon, 21 Mar 2011 23:25:25 +0000 (23:25 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 21 Mar 2011 23:25:25 +0000 (23:25 +0000)
application/hub/main/cruncher/mcrypt/class_HubMcryptCruncher.php
application/hub/main/helper/hub/announcement/class_HubDescriptorHelper.php
application/hub/main/helper/hub/connection/class_HubSelfConnectHelper.php
application/hub/main/tags/package/class_PackageTags.php
application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php
application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php
application/hub/main/template/objects/class_XmlObjectRegistryTemplateEngine.php
index.php

index 35e5dda0a0928185d937a831be30472b1e1ed8f1..442268e7c93cf4f560abc2de6eede8a982aa3ed4 100644 (file)
@@ -111,7 +111,7 @@ class HubMcryptCruncher extends BaseHubCruncher implements CruncherHelper, Regis
                // Output all lines
                $this->debugOutput(' ');
                $this->debugOutput('MCrypt Cruncher v' . $this->getVersion() . ' is starting ...');
-               $this->debugOutput('Copyright (c) 2011 MCrypt Cruncher Developer Team');
+               $this->debugOutput('Copyright (c) 2011 Hub Developer Team');
                $this->debugOutput(' ');
                $this->debugOutput('This program comes with ABSOLUTELY NO WARRANTY; for details see docs/COPYING.');
                $this->debugOutput('This is free software, and you are welcome to redistribute it under certain');
index 6e912d0ef29511bf659a6a5f6ec0cef3bf3ba8db..f8c090366c335983248aa4f94a03aa754038b377 100644 (file)
@@ -72,7 +72,7 @@ class HubDescriptorHelper extends BaseHubHelper implements HelpableHub {
                $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                // Get a XML template instance
-               $templateInstance = ObjectFactory::createObjectByConfiguredName('node_announcement_template_class', array($applicationInstance));
+               $templateInstance = ObjectFactory::createObjectByConfiguredName('node_announcement_template_class');
 
                // Disable language support
                $templateInstance->enableLanguageSupport(false);
index 9711cb0022a7d5fc7122b47e3f2e2efacba5c7b4..552e031a0658992b9261e077679cf7f8345bb257 100644 (file)
@@ -71,7 +71,7 @@ class HubSelfConnectHelper extends BaseHubHelper implements HelpableHub {
                $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                // Get a XML template instance
-               $templateInstance = ObjectFactory::createObjectByConfiguredName('node_self_connect_template_class', array($applicationInstance));
+               $templateInstance = ObjectFactory::createObjectByConfiguredName('node_self_connect_template_class');
 
                // Disable language support
                $templateInstance->enableLanguageSupport(false);
index be54b5765b90e94bcd30d805c2444ef3163fd5d4..c809c417697d18dedbb2e013ae1c1a00c70cd0b4 100644 (file)
@@ -74,7 +74,7 @@ class PackageTags extends BaseTags implements Tagable {
                $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                // Get a XML template instance
-               $templateInstance = ObjectFactory::createObjectByConfiguredName('node_object_registry_template_class', array($applicationInstance));
+               $templateInstance = ObjectFactory::createObjectByConfiguredName('node_object_registry_template_class');
 
                // Disable language support
                $templateInstance->enableLanguageSupport(false);
index f4a066fd93ef007e4770009d82a0f175e9242f03..7e952d8b27d946d490b8b1e82546c786e0ab3807 100644 (file)
@@ -69,7 +69,6 @@ class XmlAnnouncementTemplateEngine extends BaseTemplateEngine implements Compil
        /**
         * Creates an instance of the class TemplateEngine and prepares it for usage
         *
-        * @param       $applicationInstance    A manageable application
         * @return      $templateInstance               An instance of TemplateEngine
         * @throws      BasePathIsEmptyException                If the provided $templateBasePath is empty
         * @throws      InvalidBasePathStringException  If $templateBasePath is no string
@@ -78,10 +77,13 @@ class XmlAnnouncementTemplateEngine extends BaseTemplateEngine implements Compil
         * @throws      BasePathReadProtectedException  If $templateBasePath is
         *                                                                                      read-protected
         */
-       public static final function createXmlAnnouncementTemplateEngine (ManageableApplication $applicationInstance) {
+       public static final function createXmlAnnouncementTemplateEngine () {
                // Get a new instance
                $templateInstance = new XmlAnnouncementTemplateEngine();
 
+               // Get the application instance from registry
+               $applicationInstance = Registry::getRegistry()->getInstance('app');
+
                // Determine base path
                $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
 
@@ -270,7 +272,7 @@ class XmlAnnouncementTemplateEngine extends BaseTemplateEngine implements Compil
                // Is the template dependency set?
                if ((!empty($templateDependency)) && (!isset($this->dependencyContent[$node]))) {
                        // Get a temporay template instance
-                       $templateInstance = ObjectFactory::createObjectByConfiguredName('node_announcement_template_class', array($this->getApplicationInstance()));
+                       $templateInstance = ObjectFactory::createObjectByConfiguredName('node_announcement_template_class');
 
                        // Then load it
                        $templateInstance->loadAnnouncementTemplate($templateDependency);
index df6cdd09b479b6a54887764be90ec3a47907e2fb..ccb4a84c534fc44214f857469e06baebb40a7342 100644 (file)
@@ -62,7 +62,6 @@ class XmlSelfConnectTemplateEngine extends BaseTemplateEngine implements Compile
        /**
         * Creates an instance of the class TemplateEngine and prepares it for usage
         *
-        * @param       $applicationInstance    A manageable application
         * @return      $templateInstance               An instance of TemplateEngine
         * @throws      BasePathIsEmptyException                If the provided $templateBasePath is empty
         * @throws      InvalidBasePathStringException  If $templateBasePath is no string
@@ -71,10 +70,13 @@ class XmlSelfConnectTemplateEngine extends BaseTemplateEngine implements Compile
         * @throws      BasePathReadProtectedException  If $templateBasePath is
         *                                                                                      read-protected
         */
-       public static final function createXmlSelfConnectTemplateEngine (ManageableApplication $applicationInstance) {
+       public static final function createXmlSelfConnectTemplateEngine () {
                // Get a new instance
                $templateInstance = new XmlSelfConnectTemplateEngine();
 
+               // Get the application instance from registry
+               $applicationInstance = Registry::getRegistry()->getInstance('app');
+
                // Determine base path
                $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
 
@@ -263,7 +265,7 @@ class XmlSelfConnectTemplateEngine extends BaseTemplateEngine implements Compile
                // Is the template dependency set?
                if ((!empty($templateDependency)) && (!isset($this->dependencyContent[$node]))) {
                        // Get a temporay template instance
-                       $templateInstance = ObjectFactory::createObjectByConfiguredName('node_self_connect_template_class', array($this->getApplicationInstance()));
+                       $templateInstance = ObjectFactory::createObjectByConfiguredName('node_self_connect_template_class');
 
                        // Then load it
                        $templateInstance->loadSelfConnectTemplate($templateDependency);
index 438565cd481866c733aeac83dda70b84df11fe34..81b5cba743505ad3f5e3409c181be7152742fc03 100644 (file)
@@ -74,7 +74,6 @@ class XmlObjectRegistryTemplateEngine extends BaseTemplateEngine implements Comp
        /**
         * Creates an instance of the class TemplateEngine and prepares it for usage
         *
-        * @param       $applicationInstance    A manageable application
         * @return      $templateInstance               An instance of TemplateEngine
         * @throws      BasePathIsEmptyException                If the provided $templateBasePath is empty
         * @throws      InvalidBasePathStringException  If $templateBasePath is no string
@@ -83,10 +82,13 @@ class XmlObjectRegistryTemplateEngine extends BaseTemplateEngine implements Comp
         * @throws      BasePathReadProtectedException  If $templateBasePath is
         *                                                                                      read-protected
         */
-       public static final function createXmlObjectRegistryTemplateEngine (ManageableApplication $applicationInstance) {
+       public static final function createXmlObjectRegistryTemplateEngine () {
                // Get a new instance
                $templateInstance = new XmlObjectRegistryTemplateEngine();
 
+               // Get the application instance from registry
+               $applicationInstance = Registry::getRegistry()->getInstance('app');
+
                // Determine base path
                $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
 
@@ -282,7 +284,7 @@ class XmlObjectRegistryTemplateEngine extends BaseTemplateEngine implements Comp
                // Is the template dependency set?
                if ((!empty($templateDependency)) && (!isset($this->dependencyContent[$node]))) {
                        // Get a temporay template instance
-                       $templateInstance = ObjectFactory::createObjectByConfiguredName('node_object_registry_template_class', array($this->getApplicationInstance()));
+                       $templateInstance = ObjectFactory::createObjectByConfiguredName('node_object_registry_template_class');
 
                        // Then load it
                        $templateInstance->loadObjectRegistryTemplate($templateDependency);
index f374e7e34b811bc5193e06f84741d2de2b25fbcd..050f99828af55bc8ab08e546b97c8f216533b830 100644 (file)
--- a/index.php
+++ b/index.php
@@ -98,7 +98,7 @@ final class ApplicationEntryPoint {
                        // Use the template engine for putting out (nicer look) the message
                        try {
                                // Get the template instance from our object factory
-                               $templateInstance = ObjectFactory::createObjectByName($tpl, array(ApplicationHelper::getInstance()));
+                               $templateInstance = ObjectFactory::createObjectByName($tpl);
                        } catch (FrameworkException $e) {
                                die(sprintf("[Main:] Could not initialize template engine for reason: <span class=\"exception_reason\">%s</span>",
                                        $e->getMessage()