]> git.mxchange.org Git - city.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Wed, 11 Apr 2018 04:38:03 +0000 (06:38 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 11 Apr 2018 04:38:03 +0000 (06:38 +0200)
- ApplicationHelper needs to expand BaseApplication to have "self-registration"
  generically done
- updated 'core' to latest commit

Signed-off-by: Roland Häder <roland@mxchange.org>
application/city/class_ApplicationHelper.php
application/city/classes/city_daemon/class_BaseCityDaemon.php
application/city/classes/commands/html/class_CityHtmlConfirmCommand.php
application/city/classes/commands/html/class_CityHtmlLoginAreaCommand.php
application/city/classes/commands/html/class_CityHtmlLoginCommand.php
application/city/classes/commands/html/class_CityHtmlLoginFailedCommand.php
application/city/classes/commands/html/class_CityHtmlResendLinkCommand.php
application/city/classes/commands/html/class_HtmlLogoutDoneCommand.php
core

index 794635c1c2b0b3d5e140d5fd5308794642136311..5aa8b14a4a821214a5761c26979a6afd27f82868 100644 (file)
@@ -3,11 +3,11 @@
 namespace Org\Mxchange\CoreFramework\Helper\Application;
 
 // Import framework stuff
+use Org\Mxchange\CoreFramework\Application\BaseApplication;
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
 use Org\Mxchange\CoreFramework\Loader\ClassLoader;
 use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
-use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
 
@@ -50,7 +50,7 @@ use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
-class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplication, Registerable {
+class ApplicationHelper extends BaseApplication implements ManageableApplication, Registerable {
        /**
         * The version number of this application
         */
index 667eaac1801dac0db015196fb568525b85604d5e..fc6fa2b45058a034140e028876a7d6ea44c146ca 100644 (file)
@@ -100,11 +100,11 @@ abstract class BaseCityDaemon extends BaseCitySystem implements Updateable, Adda
         */
        public function outputConsoleTeaser () {
                // Get the app instance (for shortening our code)
-               $app = $this->getApplicationInstance();
+               $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
 
                // Output all lines
                self::createDebugInstance(__CLASS__)->debugOutput(' ');
-               self::createDebugInstance(__CLASS__)->debugOutput($app->getAppName() . ' v' . $app->getAppVersion() . ' - ' . FrameworkBootstrap::getRequestInstance()->getRequestElement('mode') . ' daemon starting');
+               self::createDebugInstance(__CLASS__)->debugOutput($applicationInstance->getAppName() . ' v' . $applicationInstance->getAppVersion() . ' - ' . FrameworkBootstrap::getRequestInstance()->getRequestElement('mode') . ' daemon starting');
                self::createDebugInstance(__CLASS__)->debugOutput('Copyright (c) 2015, 2016 City Developer Team');
                self::createDebugInstance(__CLASS__)->debugOutput(' ');
                self::createDebugInstance(__CLASS__)->debugOutput('This program comes with ABSOLUTELY NO WARRANTY; for details see docs/COPYING.');
index 9c46a1474a3e07bce2ecd5d15b38e14713ae75c9..81a6cabd0f80f7b262ec166f155f4cb8839afcf7 100644 (file)
@@ -70,7 +70,7 @@ class CityHtmlConfirmCommand extends BaseCommand implements Commandable {
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Get the application instance
-               $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
+               $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
 
                // Prepare a template instance
                $templateInstance = $this->prepareTemplateInstance($applicationInstance);
index 0cb727ba053087f41f398ceda82fdb2e0b34254c..4197b4d39fac4eb8c224699679c43cc7cda76d4c 100644 (file)
@@ -94,7 +94,7 @@ class CityHtmlLoginAreaCommand extends BaseCommand implements Commandable {
                } // END - if
 
                // Get the application instance
-               $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
+               $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
 
                // Prepare a template instance
                $templateInstance = $this->prepareTemplateInstance($applicationInstance);
@@ -193,7 +193,7 @@ class CityHtmlLoginAreaCommand extends BaseCommand implements Commandable {
                } // END - if
 
                // Get application instance
-               $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
+               $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
 
                // Get a resolver
                $actionResolver = HtmlActionResolver::createHtmlActionResolver($this->actionName, $applicationInstance);
index 46cd32a71b99c066f0b21af795817cfdbf8e6537..5ead86c7e79d81115cea317958047b45635ce376 100644 (file)
@@ -73,7 +73,7 @@ class CityHtmlLoginCommand extends BaseCommand implements Commandable, Registera
                GenericRegistry::getRegistry()->addInstance('extra', $this);
 
                // Get the application instance
-               $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
+               $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
 
                // Prepare a template instance
                $templateInstance = $this->prepareTemplateInstance($applicationInstance);
index 758159b3c1c24a2c6a6d336a159c9bbe09bc86a4..d1c24ad86b62d23cf8be2e11fd34b87861b79d5e 100644 (file)
@@ -69,7 +69,7 @@ class CityHtmlLoginFailedCommand extends BaseCommand implements Commandable {
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Get the application instance
-               $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
+               $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
 
                // Prepare a template instance
                $templateInstance = $this->prepareTemplateInstance($applicationInstance);
index b67be6783f50c02fda4877b559321bc7c6d65491..c625b14c35510748b474e1809eb077b9dd5acb35 100644 (file)
@@ -74,7 +74,7 @@ class CityHtmlResendLinkCommand extends BaseCommand implements Commandable {
                $userInstance = GenericRegistry::getRegistry()->getInstance('user');
 
                // Get an application instance
-               $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
+               $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
 
                // Get a RNG instance (Random Number Generator)
                $rngInstance = ObjectFactory::createObjectByConfiguredName('rng_class');
index f4824bedc494192dd551b9781ced9e086c4234b5..90b3206523a82056ffaccb2c94f732e3a2bc2e5c 100644 (file)
@@ -70,7 +70,7 @@ class HtmlLogoutDoneCommand extends BaseCommand implements Commandable {
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Get the application instance
-               $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
+               $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
 
                // Prepare a template instance
                $templateInstance = $this->prepareTemplateInstance($applicationInstance);
diff --git a/core b/core
index 2f930fd62f97e06a6b90afb971cce6343522f9b9..e137daa3a06f4b9e3767db913854c609383e8533 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit 2f930fd62f97e06a6b90afb971cce6343522f9b9
+Subproject commit e137daa3a06f4b9e3767db913854c609383e8533