From: Roland Häder Date: Sat, 25 Feb 2023 13:23:10 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=city.git Continued: - changed GenericRegistry to ObjectRegistry - updated 'core' framework --- diff --git a/application/city/classes/city_daemon/class_BaseCityDaemon.php b/application/city/classes/city_daemon/class_BaseCityDaemon.php index c8eeaf3..7b104e0 100644 --- a/application/city/classes/city_daemon/class_BaseCityDaemon.php +++ b/application/city/classes/city_daemon/class_BaseCityDaemon.php @@ -18,7 +18,7 @@ use Org\Mxchange\CoreFramework\Factory\Database\Frontend\DatabaseFrontendFactory use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry;; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; use Org\Mxchange\CoreFramework\Traits\Crypto\CryptoTrait; @@ -87,7 +87,7 @@ abstract class BaseCityDaemon extends BaseCitySystem implements Updateable, Adda $this->setCryptoInstance($cryptoInstance); // Add own instance to registry - GenericRegistry::getRegistry()->addInstance('city', $this); + ObjectRegistry::getRegistry('factory')->addInstance('city', $this); // Init state which sets the state to 'init' $this->initState(); @@ -190,7 +190,7 @@ abstract class BaseCityDaemon extends BaseCitySystem implements Updateable, Adda */ public function activateCityDaemon (Requestable $requestInstance, Responseable $responseInstance) { // Get the controller here - $controllerInstance = GenericRegistry::getRegistry()->getInstance('controller'); + $controllerInstance = ObjectRegistry::getRegistry('generic')->getInstance('controller'); // Run all filters for the City activation $controllerInstance->executeActivationFilters($requestInstance, $responseInstance); diff --git a/application/city/classes/city_daemon/default/class_SimulationDefaultCityDaemon.php b/application/city/classes/city_daemon/default/class_SimulationDefaultCityDaemon.php index dcfe726..b6777d4 100644 --- a/application/city/classes/city_daemon/default/class_SimulationDefaultCityDaemon.php +++ b/application/city/classes/city_daemon/default/class_SimulationDefaultCityDaemon.php @@ -11,7 +11,6 @@ use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Request\Requestable; diff --git a/application/city/classes/commands/console/class_CityConsoleDaemonCommand.php b/application/city/classes/commands/console/class_CityConsoleDaemonCommand.php index 8b86db2..b399a60 100644 --- a/application/city/classes/commands/console/class_CityConsoleDaemonCommand.php +++ b/application/city/classes/commands/console/class_CityConsoleDaemonCommand.php @@ -11,7 +11,7 @@ use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -102,7 +102,7 @@ class CityConsoleDaemonCommand extends BaseCommand implements Commandable { $cityInstance->activateCityDaemon($requestInstance, $responseInstance); // Get task handler instance - $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler'); + $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler'); // Debug message self::createDebugInstance(__CLASS__, __LINE__)->debugMessage('MAIN: --- Entering main loop. ---'); diff --git a/application/city/classes/commands/html/class_CityHtmlConfirmCommand.php b/application/city/classes/commands/html/class_CityHtmlConfirmCommand.php index 77b3d41..806ac85 100644 --- a/application/city/classes/commands/html/class_CityHtmlConfirmCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlConfirmCommand.php @@ -11,7 +11,7 @@ use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseFrontend; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Generic\NullPointerException; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -117,7 +117,7 @@ class CityHtmlConfirmCommand extends BaseCommand implements Commandable { // Get user instance try { - $userInstance = GenericRegistry::getRegistry()->getInstance('user'); + $userInstance = ObjectRegistry::getRegistry('generic')->getInstance('user'); } catch (NullPointerException $e) { // Not found user, e.g. when the user is somehow invalid $responseInstance->redirectToConfiguredUrl('html_cmd_user_is_null'); diff --git a/application/city/classes/commands/html/class_CityHtmlLoginAreaCommand.php b/application/city/classes/commands/html/class_CityHtmlLoginAreaCommand.php index d48e4af..a0de880 100644 --- a/application/city/classes/commands/html/class_CityHtmlLoginAreaCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlLoginAreaCommand.php @@ -7,7 +7,7 @@ use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -88,7 +88,7 @@ class CityHtmlLoginAreaCommand extends BaseCommand implements Commandable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get the action instance from registry - $actionInstance = GenericRegistry::getRegistry()->getInstance('action'); + $actionInstance = ObjectRegistry::getRegistry('generic')->getInstance('action'); // Do we have an action here? if ($actionInstance instanceof PerformableAction) { @@ -178,7 +178,7 @@ class CityHtmlLoginAreaCommand extends BaseCommand implements Commandable { $actionInstance = NULL; // Get registry - $registryInstance = GenericRegistry::getRegistry(); + $registryInstance = ObjectRegistry::getRegistry('generic'); // Get our application instance from the registry $applicationInstance = $registryInstance->getInstance('application'); @@ -205,7 +205,7 @@ class CityHtmlLoginAreaCommand extends BaseCommand implements Commandable { $actionInstance->addExtraFilters($controllerInstance, $requestInstance); // Remember this action in registry - GenericRegistry::getRegistry()->addInstance('action', $actionInstance); + ObjectRegistry::getRegistry('generic')->addInstance('action', $actionInstance); } } diff --git a/application/city/classes/commands/html/class_CityHtmlLoginCommand.php b/application/city/classes/commands/html/class_CityHtmlLoginCommand.php index 42e1206..bc8e3d4 100644 --- a/application/city/classes/commands/html/class_CityHtmlLoginCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlLoginCommand.php @@ -9,7 +9,7 @@ use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry;; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; @@ -74,7 +74,7 @@ class CityHtmlLoginCommand extends BaseCommand implements Commandable, Registera */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Set request instance as extra instance - GenericRegistry::getRegistry()->addInstance('extra', $this); + ObjectRegistry::getRegistry('generic')->addInstance('extra', $this); // Get the application instance $applicationInstance = ApplicationHelper::getSelfInstance(); diff --git a/application/city/classes/commands/html/class_CityHtmlLoginFailedCommand.php b/application/city/classes/commands/html/class_CityHtmlLoginFailedCommand.php index 5076e67..52248e9 100644 --- a/application/city/classes/commands/html/class_CityHtmlLoginFailedCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlLoginFailedCommand.php @@ -9,7 +9,6 @@ use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Factory\Object\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; use Org\Mxchange\CoreFramework\Response\Responseable; diff --git a/application/city/classes/commands/html/class_CityHtmlLogoutDoneCommand.php b/application/city/classes/commands/html/class_CityHtmlLogoutDoneCommand.php index 32afece..4947746 100644 --- a/application/city/classes/commands/html/class_CityHtmlLogoutDoneCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlLogoutDoneCommand.php @@ -9,7 +9,6 @@ use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Factory\Object\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; use Org\Mxchange\CoreFramework\Response\Responseable; diff --git a/application/city/classes/commands/html/class_CityHtmlResendLinkCommand.php b/application/city/classes/commands/html/class_CityHtmlResendLinkCommand.php index 3893083..0a827ba 100644 --- a/application/city/classes/commands/html/class_CityHtmlResendLinkCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlResendLinkCommand.php @@ -10,7 +10,7 @@ use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseFrontend; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -74,7 +74,7 @@ class CityHtmlResendLinkCommand extends BaseCommand implements Commandable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get user instance from registry - $userInstance = GenericRegistry::getRegistry()->getInstance('user'); + $userInstance = ObjectRegistry::getRegistry('generic')->getInstance('user'); // Get an application instance $applicationInstance = ApplicationHelper::getSelfInstance(); diff --git a/application/city/classes/database/frontend/city/class_CityInformationDatabaseFrontend.php b/application/city/classes/database/frontend/city/class_CityInformationDatabaseFrontend.php index 6f355e8..0eff857 100644 --- a/application/city/classes/database/frontend/city/class_CityInformationDatabaseFrontend.php +++ b/application/city/classes/database/frontend/city/class_CityInformationDatabaseFrontend.php @@ -11,7 +11,7 @@ use Org\Mxchange\City\Manager\City\ManageableCity; // Import framework stuff use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseFrontend; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Request\Requestable; @@ -146,7 +146,7 @@ class CityInformationDatabaseFrontend extends BaseDatabaseFrontend implements Ci */ public function ifUserHasFoundedCity () { // Get user instance - $userInstance = GenericRegistry::getRegistry()->getInstance('user'); + $userInstance = ObjectRegistry::getRegistry('generic')->getInstance('user'); // Now get a search criteria instance $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class'); @@ -224,7 +224,7 @@ class CityInformationDatabaseFrontend extends BaseDatabaseFrontend implements Ci assert(!$this->ifCityExists($cityName)); // Get user instance - $userInstance = GenericRegistry::getRegistry()->getInstance('user'); + $userInstance = ObjectRegistry::getRegistry('generic')->getInstance('user'); // Get a dataset instance $dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_CITY_INFORMATION)); diff --git a/application/city/classes/database/frontend/region/class_RegionInformationDatabaseWrapper.php b/application/city/classes/database/frontend/region/class_RegionInformationDatabaseWrapper.php index 928ce54..a9b50a8 100644 --- a/application/city/classes/database/frontend/region/class_RegionInformationDatabaseWrapper.php +++ b/application/city/classes/database/frontend/region/class_RegionInformationDatabaseWrapper.php @@ -9,7 +9,7 @@ use Org\Mxchange\City\Factory\Manager\ManagerFactory; use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseFrontend; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; // Import SPL stuff @@ -98,7 +98,7 @@ class RegionInformationDatabaseFrontend extends BaseDatabaseFrontend implements public function ifUserHasCreatedRegion () { // Get user instance /* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage('REGION-INFORMATION-DATABASE-WRAPPER: CALLED!'); - $userInstance = GenericRegistry::getRegistry()->getInstance('user'); + $userInstance = ObjectRegistry::getRegistry('generic')->getInstance('user'); // Now get a search criteria instance $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class'); @@ -197,7 +197,7 @@ class RegionInformationDatabaseFrontend extends BaseDatabaseFrontend implements } // Get user instance - $userInstance = GenericRegistry::getRegistry()->getInstance('user'); + $userInstance = ObjectRegistry::getRegistry('generic')->getInstance('user'); // Get a dataset instance $dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', [self::DB_TABLE_REGION_INFORMATION]); diff --git a/application/city/classes/database/frontend/region_map/class_RegionMapDatabaseFrontend.php b/application/city/classes/database/frontend/region_map/class_RegionMapDatabaseFrontend.php index 61ad803..1af9696 100644 --- a/application/city/classes/database/frontend/region_map/class_RegionMapDatabaseFrontend.php +++ b/application/city/classes/database/frontend/region_map/class_RegionMapDatabaseFrontend.php @@ -5,7 +5,7 @@ namespace Org\Mxchange\City\Database\Frontend\Region; // Import framework stuff use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseFrontend; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; /** @@ -89,7 +89,7 @@ class RegionMapDatabaseFrontend extends BaseDatabaseFrontend implements RegionMa assert(!$this->ifRegionExists($regionName)); // Get user instance - $userInstance = GenericRegistry::getRegistry()->getInstance('user'); + $userInstance = ObjectRegistry::getRegistry('generic')->getInstance('user'); // Get a dataset instance $dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_REGION_MAP)); diff --git a/application/city/classes/factories/city_daemon/class_CityDaemonFactory.php b/application/city/classes/factories/city_daemon/class_CityDaemonFactory.php index bbe7c7e..4ffa983 100644 --- a/application/city/classes/factories/city_daemon/class_CityDaemonFactory.php +++ b/application/city/classes/factories/city_daemon/class_CityDaemonFactory.php @@ -7,7 +7,7 @@ use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -57,9 +57,9 @@ class CityDaemonFactory extends BaseFactory { $factoryInstance = new CityDaemonFactory(); // If there is no handler? - if (GenericRegistry::getRegistry()->instanceExists('city')) { + if (ObjectRegistry::getRegistry('factory')->instanceExists('city')) { // Get handler from registry - $cityInstance = GenericRegistry::getRegistry()->getInstance('city'); + $cityInstance = ObjectRegistry::getRegistry('factory')->getInstance('city'); } elseif (($requestInstance instanceof Requestable) && ($responseInstance instanceof Responseable)) { // The default city-mode is from our configuration $cityMode = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('city_default_mode'); diff --git a/application/city/classes/factories/manager/class_ManagerFactory.php b/application/city/classes/factories/manager/class_ManagerFactory.php index f9b5a83..20295e4 100644 --- a/application/city/classes/factories/manager/class_ManagerFactory.php +++ b/application/city/classes/factories/manager/class_ManagerFactory.php @@ -5,7 +5,7 @@ namespace Org\Mxchange\City\Factory\Manager; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A factory class for managers @@ -54,15 +54,15 @@ class ManagerFactory extends BaseFactory { $key = $type . '_manager'; // If there is no handler? - if (GenericRegistry::getRegistry()->instanceExists($key)) { + if (ObjectRegistry::getRegistry('factory')->instanceExists($key)) { // Get handler from registry - $managerInstance = GenericRegistry::getRegistry()->getInstance($key); + $managerInstance = ObjectRegistry::getRegistry('factory')->getInstance($key); } else { // Get the proper manager instance $managerInstance = ObjectFactory::createObjectByConfiguredName($key . '_class'); // Add it to the registry - GenericRegistry::getRegistry()->addInstance($key, $managerInstance); + ObjectRegistry::getRegistry('factory')->addInstance($key, $managerInstance); } // Return the instance diff --git a/application/city/classes/filter/shutdown/city/class_CityDaemonShutdownTaskHandlerFilter.php b/application/city/classes/filter/shutdown/city/class_CityDaemonShutdownTaskHandlerFilter.php index f577159..1cec3e0 100644 --- a/application/city/classes/filter/shutdown/city/class_CityDaemonShutdownTaskHandlerFilter.php +++ b/application/city/classes/filter/shutdown/city/class_CityDaemonShutdownTaskHandlerFilter.php @@ -7,7 +7,7 @@ use Org\Mxchange\City\Filter\BaseCityFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -68,7 +68,7 @@ class CityDaemonShutdownTaskHandlerFilter extends BaseCityFilter implements Filt */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get task handler instance - $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler'); + $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler'); // Shutdown the task manager and all its registered tasks $handlerInstance->doShutdown(); diff --git a/application/city/classes/filter/task/city_daemon/class_CityDaemonTaskHandlerInitializerFilter.php b/application/city/classes/filter/task/city_daemon/class_CityDaemonTaskHandlerInitializerFilter.php index efafcc6..be67dfa 100644 --- a/application/city/classes/filter/task/city_daemon/class_CityDaemonTaskHandlerInitializerFilter.php +++ b/application/city/classes/filter/task/city_daemon/class_CityDaemonTaskHandlerInitializerFilter.php @@ -9,7 +9,7 @@ use Org\Mxchange\Factory\City\Daemon\CityDaemonFactory; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -76,7 +76,7 @@ class CityDaemonTaskHandlerInitializerFilter extends BaseCityFilter implements F $handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class'); // Put the task handler in registry - GenericRegistry::getRegistry()->addInstance('task_handler', $handlerInstance); + ObjectRegistry::getRegistry('generic')->addInstance('task_handler', $handlerInstance); // Prepare a city map expansion task $taskInstance = ObjectFactory::createObjectByConfiguredName('city_daemon_map_expander_task_class'); diff --git a/application/city/classes/login/class_CityGuestLogin.php b/application/city/classes/login/class_CityGuestLogin.php index b7bb8ae..86b83e5 100644 --- a/application/city/classes/login/class_CityGuestLogin.php +++ b/application/city/classes/login/class_CityGuestLogin.php @@ -8,7 +8,7 @@ use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Factory\User\UserFactory; use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -80,7 +80,7 @@ class CityGuestLogin extends BaseFrameworkSystem implements LoginableUser, Regis $userInstance = UserFactory::createUserByRequest($requestInstance); // Remember this new instance in registry - GenericRegistry::getRegistry()->addInstance('user', $userInstance); + ObjectRegistry::getRegistry('generic')->addInstance('user', $userInstance); // Is the password correct? if ($userInstance->ifPasswordHashMatches($requestInstance) === FALSE) { @@ -116,7 +116,7 @@ class CityGuestLogin extends BaseFrameworkSystem implements LoginableUser, Regis */ public function ifLoginWasSuccessfull () { // Is the registry key there? - $loginDone = (GenericRegistry::getRegistry()->getInstance('login') instanceof Registerable); + $loginDone = (ObjectRegistry::getRegistry('generic')->getInstance('login') instanceof Registerable); // Return the result return $loginDone; @@ -139,7 +139,7 @@ class CityGuestLogin extends BaseFrameworkSystem implements LoginableUser, Regis $plainPassword = FrameworkBootstrap::getRequestInstance()->getRequestElement($requestKey); // Get user instance - $userInstance = GenericRegistry::getRegistry()->getInstance('user'); + $userInstance = ObjectRegistry::getRegistry('generic')->getInstance('user'); // Get a crypto helper and hash the password $this->hashedPassword = ObjectFactory::createObjectByConfiguredName('crypto_class')->hashString($plainPassword, $userInstance->getPasswordHash()); diff --git a/application/city/classes/login/class_CityUserLogin.php b/application/city/classes/login/class_CityUserLogin.php index 8ab2a45..8ce82bd 100644 --- a/application/city/classes/login/class_CityUserLogin.php +++ b/application/city/classes/login/class_CityUserLogin.php @@ -8,7 +8,7 @@ use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Factory\User\UserFactory; use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -83,7 +83,7 @@ class CityUserLogin extends BaseFrameworkSystem implements LoginableUser, Regist $userInstance = UserFactory::createUserByRequest($requestInstance); // Remember this new instance in registry - GenericRegistry::getRegistry()->addInstance('user', $userInstance); + ObjectRegistry::getRegistry('generic')->addInstance('user', $userInstance); // Is the password correct? if ($userInstance->ifPasswordHashMatches($requestInstance) === FALSE) { @@ -124,7 +124,7 @@ class CityUserLogin extends BaseFrameworkSystem implements LoginableUser, Regist */ public function ifLoginWasSuccessfull () { // Is the registry key there? - $loginDone = (GenericRegistry::getRegistry()->getInstance('login') instanceof Registerable); + $loginDone = (ObjectRegistry::getRegistry('generic')->getInstance('login') instanceof Registerable); // Return the result return $loginDone; @@ -147,7 +147,7 @@ class CityUserLogin extends BaseFrameworkSystem implements LoginableUser, Regist $plainPassword = FrameworkBootstrap::getRequestInstance()->getRequestElement($requestKey); // Get user instance - $userInstance = GenericRegistry::getRegistry()->getInstance('user'); + $userInstance = ObjectRegistry::getRegistry('generic')->getInstance('user'); // Get a crypto helper and hash the password $this->hashedPassword = ObjectFactory::createObjectByConfiguredName('crypto_class')->hashString($plainPassword, $userInstance->getPasswordHash()); diff --git a/application/city/classes/login/helper/class_CityLoginHelper.php b/application/city/classes/login/helper/class_CityLoginHelper.php index 45dad3d..9a32925 100644 --- a/application/city/classes/login/helper/class_CityLoginHelper.php +++ b/application/city/classes/login/helper/class_CityLoginHelper.php @@ -9,7 +9,7 @@ use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Generic\NullPointerException; use Org\Mxchange\CoreFramework\Helper\Login\BaseLoginHelper; use Org\Mxchange\CoreFramework\Helper\Login\HelpableLogin; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -74,7 +74,7 @@ class CityLoginHelper extends BaseLoginHelper implements HelpableLogin { $helperInstance = new CityLoginHelper(); // Get a user instance from registry - $userInstance = GenericRegistry::getRegistry()->getInstance('user'); + $userInstance = ObjectRegistry::getRegistry('generic')->getInstance('user'); // Is this instance valid? if (!$userInstance instanceof ManageableAccount) { @@ -116,6 +116,6 @@ class CityLoginHelper extends BaseLoginHelper implements HelpableLogin { $loginInstance->setPasswordAuth(FrameworkBootstrap::getRequestInstance()->getRequestElement('pass_hash')); // Remember this login instance for later usage - GenericRegistry::getRegistry()->addInstance('login', $loginInstance); + ObjectRegistry::getRegistry('generic')->addInstance('login', $loginInstance); } } diff --git a/core b/core index ba76f13..6e12381 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit ba76f1380ebef3021b78d122cbabd6fe3173cd47 +Subproject commit 6e12381ce34de3edb56d18830949362491ddb61a