]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/filter/node/class_NodeInitializationFilter.php
Introduced NodeObjectFactory to encapsulate (and ease) a lot calls.
[hub.git] / application / hub / main / filter / node / class_NodeInitializationFilter.php
index 3d9f694a880b0a257f05c45db41b5b54a5281108..3070e8547946e74abe5303f034eb8df9d5a170f3 100644 (file)
@@ -72,16 +72,7 @@ class NodeInitializationFilter extends BaseNodeFilter implements Filterable {
                // And try to instance it
                try {
                        // Get an instance
-                       $nodeInstance = ObjectFactory::createObjectByName($className, array($requestInstance));
-
-                       // Get a registry
-                       $applicationInstance = Registry::getRegistry()->getInstance('app');
-
-                       // Set the app instance
-                       $nodeInstance->setApplicationInstance($applicationInstance);
-
-                       // Add node-specific filters
-                       $nodeInstance->addExtraFilters($applicationInstance->getControllerInstance(), $responseInstance);
+                       $nodeInstance = NodeObjectFactory::createNodeInstance($requestInstance, $responseInstance);
                } catch (ClassNotFoundException $e) {
                        // This exception means, the node mode is invalid.
                        // @TODO Can we rewrite this to app_exit() ?