From b22ee0780de26f2dbaa1952601fbdc8c27a67151 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 6 Dec 2020 08:51:42 +0100 Subject: [PATCH] Continued: - Application instance in generic registry was a little of an overdoze when there is ApplicationHelper::getSelfInstance() around, this means lesser method invocations and a bit smaller footprint (one registry entry lesser) - updated core framework MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../classes/apt-proxy/console/class_NodeConsoleAptProxy.php | 3 ++- application/hub/classes/chat/console/class_NodeConsoleChat.php | 3 ++- .../commands/console/class_HubConsoleAptProxyCommand.php | 3 ++- .../classes/commands/console/class_HubConsoleChatCommand.php | 3 ++- .../commands/console/class_HubConsoleCrawlerCommand.php | 3 ++- .../commands/console/class_HubConsoleCruncherCommand.php | 3 ++- .../classes/commands/console/class_HubConsoleMainCommand.php | 3 ++- .../classes/commands/console/class_HubConsoleMinerCommand.php | 3 ++- .../hub/classes/crawler/console/class_NodeConsoleCrawler.php | 3 ++- .../hub/classes/factories/node/class_NodeObjectFactory.php | 3 ++- .../filter/apt-proxy/class_AptProxyInitializationFilter.php | 3 ++- .../hub/classes/filter/chat/class_ChatInitializationFilter.php | 3 ++- .../filter/crawler/class_CrawlerInitializationFilter.php | 3 ++- .../filter/cruncher/class_CruncherInitializationFilter.php | 2 +- .../classes/filter/miner/class_MinerInitializationFilter.php | 3 ++- application/hub/classes/nodes/boot/class_HubBootNode.php | 3 ++- application/hub/classes/nodes/class_BaseHubNode.php | 3 ++- application/hub/classes/nodes/list/class_HubListNode.php | 3 ++- application/hub/classes/nodes/master/class_HubMasterNode.php | 3 ++- application/hub/classes/nodes/regular/class_HubRegularNode.php | 3 ++- application/hub/classes/tags/package/class_PackageTags.php | 3 ++- core | 2 +- 22 files changed, 42 insertions(+), 22 deletions(-) diff --git a/application/hub/classes/apt-proxy/console/class_NodeConsoleAptProxy.php b/application/hub/classes/apt-proxy/console/class_NodeConsoleAptProxy.php index fe9b470a2..b8391e180 100644 --- a/application/hub/classes/apt-proxy/console/class_NodeConsoleAptProxy.php +++ b/application/hub/classes/apt-proxy/console/class_NodeConsoleAptProxy.php @@ -4,6 +4,7 @@ namespace Org\Shipsimu\Hub\AptProxy; // Import framework stuff use Org\Mxchange\CoreFramework\Controller\Controller; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -72,7 +73,7 @@ class NodeConsoleAptProxy extends BaseNodeAptProxy implements AptProxy, Register */ public function outputConsoleTeaser () { // Get the app instance (for shortening our code) - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); // Output all lines self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(' '); diff --git a/application/hub/classes/chat/console/class_NodeConsoleChat.php b/application/hub/classes/chat/console/class_NodeConsoleChat.php index da1fc45f8..4218f690a 100644 --- a/application/hub/classes/chat/console/class_NodeConsoleChat.php +++ b/application/hub/classes/chat/console/class_NodeConsoleChat.php @@ -4,6 +4,7 @@ namespace Org\Shipsimu\Hub\Chat; // Import framework stuff use Org\Mxchange\CoreFramework\Controller\Controller; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -72,7 +73,7 @@ class NodeConsoleChat extends BaseNodeChat implements Chatter, Registerable { */ public function outputConsoleTeaser () { // Get the app instance (for shortening our code) - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); // Output all lines self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(' '); diff --git a/application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php b/application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php index 81883d6af..491bbb0b3 100644 --- a/application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php @@ -7,6 +7,7 @@ use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; @@ -72,7 +73,7 @@ class HubConsoleAptProxyCommand extends BaseCommand implements Commandable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get a registry and the application instance from it - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); /* * ----------------------- Bootstrapping phase ------------------------ diff --git a/application/hub/classes/commands/console/class_HubConsoleChatCommand.php b/application/hub/classes/commands/console/class_HubConsoleChatCommand.php index a4b37312e..23efd85d0 100644 --- a/application/hub/classes/commands/console/class_HubConsoleChatCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleChatCommand.php @@ -7,6 +7,7 @@ use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; @@ -72,7 +73,7 @@ class HubConsoleChatCommand extends BaseCommand implements Commandable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get a registry and the application instance from it - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); /* * ----------------------- Bootstrapping phase ------------------------ diff --git a/application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php b/application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php index fe4204ca7..decd94403 100644 --- a/application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php @@ -7,6 +7,7 @@ use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; @@ -72,7 +73,7 @@ class HubConsoleCrawlerCommand extends BaseCommand implements Commandable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get a registry and the application instance from it - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); /* * ----------------------- Bootstrapping phase ------------------------ diff --git a/application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php b/application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php index 109f49a17..020609117 100644 --- a/application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php @@ -7,6 +7,7 @@ use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; @@ -72,7 +73,7 @@ class HubConsoleCruncherCommand extends BaseCommand implements Commandable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get a registry and the application instance from it - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); /* * ----------------------- Bootstrapping phase ------------------------ diff --git a/application/hub/classes/commands/console/class_HubConsoleMainCommand.php b/application/hub/classes/commands/console/class_HubConsoleMainCommand.php index 14e6a2276..43ca8f16f 100644 --- a/application/hub/classes/commands/console/class_HubConsoleMainCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleMainCommand.php @@ -10,6 +10,7 @@ use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Controller\Controller; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; @@ -75,7 +76,7 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get a registry and the application instance from it - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); /* * ----------------------- Bootstrapping phase ------------------------ diff --git a/application/hub/classes/commands/console/class_HubConsoleMinerCommand.php b/application/hub/classes/commands/console/class_HubConsoleMinerCommand.php index 4840fa61f..bedf2e5df 100644 --- a/application/hub/classes/commands/console/class_HubConsoleMinerCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleMinerCommand.php @@ -7,6 +7,7 @@ use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; @@ -72,7 +73,7 @@ class HubConsoleMinerCommand extends BaseCommand implements Commandable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get a registry and the application instance from it - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); /* * ----------------------- Bootstrapping phase ------------------------ diff --git a/application/hub/classes/crawler/console/class_NodeConsoleCrawler.php b/application/hub/classes/crawler/console/class_NodeConsoleCrawler.php index 5e7efdd84..57698ec06 100644 --- a/application/hub/classes/crawler/console/class_NodeConsoleCrawler.php +++ b/application/hub/classes/crawler/console/class_NodeConsoleCrawler.php @@ -4,6 +4,7 @@ namespace Org\Shipsimu\Hub\Crawler; // Import framework stuff use Org\Mxchange\CoreFramework\Controller\Controller; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -73,7 +74,7 @@ class NodeConsoleCrawler extends BaseNodeCrawler implements Crawler, Registerabl */ public function outputConsoleTeaser () { // Get the app instance (for shortening our code) - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); // Output all lines self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(' '); diff --git a/application/hub/classes/factories/node/class_NodeObjectFactory.php b/application/hub/classes/factories/node/class_NodeObjectFactory.php index 1d526775b..96b966dfb 100644 --- a/application/hub/classes/factories/node/class_NodeObjectFactory.php +++ b/application/hub/classes/factories/node/class_NodeObjectFactory.php @@ -5,6 +5,7 @@ namespace Org\Shipsimu\Hub\Factory\Node; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -90,7 +91,7 @@ class NodeObjectFactory extends ObjectFactory { $nodeInstance = ObjectFactory::createObjectByName($className); // Get a registry - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); // Add node-specific filters //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NODE-FACTORY: Registering node-specific filters, responseInstance[]=%s', gettype($responseInstance))); diff --git a/application/hub/classes/filter/apt-proxy/class_AptProxyInitializationFilter.php b/application/hub/classes/filter/apt-proxy/class_AptProxyInitializationFilter.php index 146c53d77..5a22129de 100644 --- a/application/hub/classes/filter/apt-proxy/class_AptProxyInitializationFilter.php +++ b/application/hub/classes/filter/apt-proxy/class_AptProxyInitializationFilter.php @@ -5,6 +5,7 @@ namespace Org\Shipsimu\Hub\AptProxy\Filter\Initialization; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -68,7 +69,7 @@ class AptProxyInitializationFilter extends BaseAptProxyFilter implements Filtera $proxyInstance = ObjectFactory::createObjectByConfiguredName('node_console_apt_proxy_class'); // Get a registry - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); // Add apt-proxy-specific filters $proxyInstance->addExtraFilters($applicationInstance->getControllerInstance(), $responseInstance); diff --git a/application/hub/classes/filter/chat/class_ChatInitializationFilter.php b/application/hub/classes/filter/chat/class_ChatInitializationFilter.php index dbb1333f4..4e162e270 100644 --- a/application/hub/classes/filter/chat/class_ChatInitializationFilter.php +++ b/application/hub/classes/filter/chat/class_ChatInitializationFilter.php @@ -5,6 +5,7 @@ namespace Org\Shipsimu\Hub\Chat\Filter\Initialization; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -68,7 +69,7 @@ class ChatInitializationFilter extends BaseChatFilter implements Filterable { $chatInstance = ObjectFactory::createObjectByConfiguredName('node_console_chat_class'); // Get a registry - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); // Add chat-specific filters $chatInstance->addExtraFilters($applicationInstance->getControllerInstance(), $responseInstance); diff --git a/application/hub/classes/filter/crawler/class_CrawlerInitializationFilter.php b/application/hub/classes/filter/crawler/class_CrawlerInitializationFilter.php index d82ac90ec..907d55b93 100644 --- a/application/hub/classes/filter/crawler/class_CrawlerInitializationFilter.php +++ b/application/hub/classes/filter/crawler/class_CrawlerInitializationFilter.php @@ -8,6 +8,7 @@ use Org\Shipsimu\Hub\Crawler\Filter\BaseCrawlerFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -71,7 +72,7 @@ class CrawlerInitializationFilter extends BaseCrawlerFilter implements Filterabl $crawlerInstance = ObjectFactory::createObjectByConfiguredName('node_console_crawler_class'); // Get a registry - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); // Add crawler-specific filters $crawlerInstance->addExtraFilters($applicationInstance->getControllerInstance(), $responseInstance); diff --git a/application/hub/classes/filter/cruncher/class_CruncherInitializationFilter.php b/application/hub/classes/filter/cruncher/class_CruncherInitializationFilter.php index 167964314..455ab8c06 100644 --- a/application/hub/classes/filter/cruncher/class_CruncherInitializationFilter.php +++ b/application/hub/classes/filter/cruncher/class_CruncherInitializationFilter.php @@ -89,7 +89,7 @@ class CruncherInitializationFilter extends BaseCruncherFilter implements Filtera $cruncherInstance = ObjectFactory::createObjectByConfiguredName($configEntry); // Get a registry - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); // Add cruncher-specific filters $cruncherInstance->addExtraFilters($applicationInstance->getControllerInstance(), $responseInstance); diff --git a/application/hub/classes/filter/miner/class_MinerInitializationFilter.php b/application/hub/classes/filter/miner/class_MinerInitializationFilter.php index b14646918..d82488435 100644 --- a/application/hub/classes/filter/miner/class_MinerInitializationFilter.php +++ b/application/hub/classes/filter/miner/class_MinerInitializationFilter.php @@ -9,6 +9,7 @@ use Org\Shipsimu\Hub\Miner\Filter\BaseMinerFilter; use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -89,7 +90,7 @@ class MinerInitializationFilter extends BaseMinerFilter implements Filterable { $minerInstance = ObjectFactory::createObjectByConfiguredName($configEntry); // Get a registry - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); // Add miner-specific filters $minerInstance->addExtraFilters($applicationInstance->getControllerInstance(), $responseInstance); diff --git a/application/hub/classes/nodes/boot/class_HubBootNode.php b/application/hub/classes/nodes/boot/class_HubBootNode.php index 22e01fa17..9eeec2d2f 100644 --- a/application/hub/classes/nodes/boot/class_HubBootNode.php +++ b/application/hub/classes/nodes/boot/class_HubBootNode.php @@ -10,6 +10,7 @@ use Org\Shipsimu\Hub\Node\Node; use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; @@ -117,7 +118,7 @@ class HubBootNode extends BaseHubNode implements Node, Registerable { */ public function addExtraNodeFilters () { // Get the application instance from registry - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); // Get the controller from the application $controllerInstance = $applicationInstance->getControllerInstance(); diff --git a/application/hub/classes/nodes/class_BaseHubNode.php b/application/hub/classes/nodes/class_BaseHubNode.php index 89a08ce2a..28068ea26 100644 --- a/application/hub/classes/nodes/class_BaseHubNode.php +++ b/application/hub/classes/nodes/class_BaseHubNode.php @@ -28,6 +28,7 @@ use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint; use Org\Mxchange\CoreFramework\Factory\Database\Frontend\DatabaseFrontendFactory; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Generic\NullPointerException; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -311,7 +312,7 @@ abstract class BaseHubNode extends BaseHubSystem implements Updateable, AddableC */ public function outputConsoleTeaser () { // Get the app instance (for shortening our code) - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); // Output all lines self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(' '); diff --git a/application/hub/classes/nodes/list/class_HubListNode.php b/application/hub/classes/nodes/list/class_HubListNode.php index b167fd724..28afe67a2 100644 --- a/application/hub/classes/nodes/list/class_HubListNode.php +++ b/application/hub/classes/nodes/list/class_HubListNode.php @@ -9,6 +9,7 @@ use Org\Shipsimu\Hub\Node\Node; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; @@ -78,7 +79,7 @@ class HubListNode extends BaseHubNode implements Node, Registerable { */ public function addExtraNodeFilters () { // Get the application instance from registry - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); // Get the controller from the application $controllerInstance = $applicationInstance->getControllerInstance(); diff --git a/application/hub/classes/nodes/master/class_HubMasterNode.php b/application/hub/classes/nodes/master/class_HubMasterNode.php index 3b57c97d7..c5db64752 100644 --- a/application/hub/classes/nodes/master/class_HubMasterNode.php +++ b/application/hub/classes/nodes/master/class_HubMasterNode.php @@ -9,6 +9,7 @@ use Org\Shipsimu\Hub\Node\Node; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; @@ -81,7 +82,7 @@ class HubMasterNode extends BaseHubNode implements Node, Registerable { */ public function addExtraNodeFilters () { // Get the application instance from registry - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); // Get the controller from the application $controllerInstance = $applicationInstance->getControllerInstance(); diff --git a/application/hub/classes/nodes/regular/class_HubRegularNode.php b/application/hub/classes/nodes/regular/class_HubRegularNode.php index ce0bf1d86..12ed769fb 100644 --- a/application/hub/classes/nodes/regular/class_HubRegularNode.php +++ b/application/hub/classes/nodes/regular/class_HubRegularNode.php @@ -9,6 +9,7 @@ use Org\Shipsimu\Hub\Node\Node; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; @@ -78,7 +79,7 @@ class HubRegularNode extends BaseHubNode implements Node, Registerable { */ public function addExtraNodeFilters () { // Get the application instance from registry - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); // Get the controller from the application $controllerInstance = $applicationInstance->getControllerInstance(); diff --git a/application/hub/classes/tags/package/class_PackageTags.php b/application/hub/classes/tags/package/class_PackageTags.php index 66145e110..5068a737a 100644 --- a/application/hub/classes/tags/package/class_PackageTags.php +++ b/application/hub/classes/tags/package/class_PackageTags.php @@ -16,6 +16,7 @@ use Org\Shipsimu\Hub\Template\Engine\Xml\ObjectRegistry\XmlObjectRegistryTemplat // Import framework stuff use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint; use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory; +use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** @@ -89,7 +90,7 @@ class PackageTags extends BaseTag implements Tagable { private function initObjectRegistry () { // Get the application instance /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-TAGS: Initializing object registry - CALLED!'); - $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); + $applicationInstance = ApplicationHelper::getSelfInstance(); // Get a XML template instance $templateInstance = XmlTemplateEngineFactory::createXmlTemplateEngineInstance('node_object_registry_template_class'); diff --git a/core b/core index 196ab0fc0..c3da44af8 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 196ab0fc031d6987c87e8c5d257c39f664ec9151 +Subproject commit c3da44af864dac278a45df35d39f5cd75ced35a2 -- 2.39.5