public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// The default node-mode is from our configuration
$nodeMode = $this->getConfigInstance()->getConfigEntry('node_default_mode');
- //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[INIT:] Got default node mode ' . $nodeMode . ' from configuration.');
+ //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE-INIT-FILTER[' . __METHOD__ . ':' . __LINE__ . ']: Got default node mode ' . $nodeMode . ' from configuration.');
// Is the node 'mode' parameter set?
if ($requestInstance->isRequestElementSet('mode')) {
// 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() ?
// Set the node instance in registry
Registry::getRegistry()->addInstance('node', $nodeInstance);
- //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[INIT:] Node ' . $nodeMode . ' has been added to registry.');
+ //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE-INIT-FILTER[' . __METHOD__ . ':' . __LINE__ . ']: Node ' . $nodeMode . ' has been added to registry.');
}
}