]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/template/objects/class_XmlObjectRegistryTemplateEngine.php
Removed obsolete parameter 'applicationInstance' from all template engines
[hub.git] / application / hub / main / template / objects / class_XmlObjectRegistryTemplateEngine.php
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);