From: Roland Haeder Date: Thu, 27 Aug 2015 01:11:26 +0000 (+0200) Subject: Use factory instead of direct registry key. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2c96cc75b24270c87f6dc8564e9d1796f735b3ce;p=hub.git Use factory instead of direct registry key. Signed-off-by: Roland Haeder --- diff --git a/application/hub/classes/filter/activation/node/class_NodeActivation b/application/hub/classes/filter/activation/node/class_NodeActivation index f64d0ab07..698247588 100644 --- a/application/hub/classes/filter/activation/node/class_NodeActivation +++ b/application/hub/classes/filter/activation/node/class_NodeActivation @@ -55,7 +55,7 @@ class HubActivation???Filter extends BaseNodeFilter implements Filterable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get node instance - $nodeInstance = Registry::getRegistry()->getInstance('node'); + $nodeInstance = NodeObjectFactory::createNodeInstance($requestInstance, $responseInstance); // Now do something $this->partialStub('Please implement this step.'); diff --git a/application/hub/classes/filter/bootstrap/node/class_NodeBootstrap b/application/hub/classes/filter/bootstrap/node/class_NodeBootstrap index 5371b8ae7..d0963daf0 100644 --- a/application/hub/classes/filter/bootstrap/node/class_NodeBootstrap +++ b/application/hub/classes/filter/bootstrap/node/class_NodeBootstrap @@ -55,7 +55,7 @@ class NodeBootstrap???Filter extends BaseNodeFilter implements Filterable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get node instance - $nodeInstance = Registry::getRegistry()->getInstance('node'); + $nodeInstance = NodeObjectFactory::createNodeInstance($requestInstance, $responseInstance); // Now do something $this->partialStub('Please implement this step.'); diff --git a/application/hub/classes/filter/class_ b/application/hub/classes/filter/class_ index a3605aa8c..a19a0646b 100644 --- a/application/hub/classes/filter/class_ +++ b/application/hub/classes/filter/class_ @@ -56,7 +56,7 @@ class Hub!!!???Filter extends BaseHubFilter implements Filterable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get node instance - $nodeInstance = Registry::getRegistry()->getInstance('node'); + $nodeInstance = NodeObjectFactory::createNodeInstance($requestInstance, $responseInstance); // Now do something $this->partialStub('Please implement this step.'); diff --git a/application/hub/classes/filter/shutdown/node/class_NodeShutdown b/application/hub/classes/filter/shutdown/node/class_NodeShutdown index 85398da88..9bf68cae8 100644 --- a/application/hub/classes/filter/shutdown/node/class_NodeShutdown +++ b/application/hub/classes/filter/shutdown/node/class_NodeShutdown @@ -56,7 +56,7 @@ class HubShutdown???Filter extends BaseNodeFilter implements Filterable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get node instance - $nodeInstance = Registry::getRegistry()->getInstance('node'); + $nodeInstance = NodeObjectFactory::createNodeInstance($requestInstance, $responseInstance); // Now do something $this->partialStub('Please implement this step.'); diff --git a/application/hub/classes/listener/tcp/class_TcpListener.php b/application/hub/classes/listener/tcp/class_TcpListener.php index d3fbcf35c..4d01c5a2c 100644 --- a/application/hub/classes/listener/tcp/class_TcpListener.php +++ b/application/hub/classes/listener/tcp/class_TcpListener.php @@ -280,7 +280,7 @@ class TcpListener extends BaseListener implements Listenable { } // END - if // Get node instance - $nodeInstance = Registry::getRegistry()->getInstance('node'); + $nodeInstance = NodeObjectFactory::createNodeInstance(); // Create a faked package data array $packageData = array(