]> git.mxchange.org Git - hub.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Mon, 22 May 2017 18:42:34 +0000 (20:42 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 21 Aug 2020 16:50:08 +0000 (18:50 +0200)
- no more 'base_path', was to unflexible and horribly wrong. Now there are 3
  configuration entries:

  'root_base_path'        - Where index.php has been found
  'framework_base_path'   - Where the framework is located
  'application_base_path' - Where the applications are located (without application name)
- imported FileNotFoundException
- imported DhtObjectFactory
- updated core framework

Signed-off-by: Roland Häder <roland@mxchange.org>
application/hub/classes/handler/answer-status/announcement/class_NodeAnnouncementAnswerOkayHandler.php
application/hub/classes/handler/answer-status/requests/class_RequestNodeListAnswerOkayHandler.php
application/hub/classes/handler/message-types/class_BaseMessageHandler.php
application/hub/classes/handler/message-types/requests/class_NodeMessageRequestNodeListHandler.php
application/hub/classes/source/urls/class_CrawlerUploadedListUrlSource.php
application/hub/classes/states/dht/init/class_DhtInitState.php
application/hub/classes/states/dht/virgin/class_DhtVirginState.php
application/hub/classes/template/class_BaseXmlTemplateEngine.php
core
index.php

index a55714d15cabc896663b7ce9ac1caee979882c6f..fae30321de999f1358fb81ab4cfc8f5ebeb97563 100644 (file)
@@ -4,6 +4,7 @@ namespace Hub\Handler\Node\Announcement\Answer;
 
 // Import application-specific stuff
 use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
+use Hub\Factory\Dht\DhtObjectFactory;
 use Hub\Factory\Node\NodeObjectFactory;
 use Hub\Network\Receive\Receivable;
 use Hub\Node\BaseHubNode;
index 3199bb5d22071fd18cd784bcda14ef705bd50f3c..f3c4a47a387068a718af07dddb4c0c321aee39d0 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Handler\Answer\Okay\NodeList;
 
 // Import application-specific stuff
+use Hub\Factory\Dht\DhtObjectFactory;
 use Hub\Network\Receive\Receivable;
 
 // Import framework stuff
index f9038c8ff3118908221f08eecc02be987d9b5b30..e2dee462e1b8ae985b7e6222d0f44991774532a0 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Handler\Message;
 
 // Import hub-specific stuff
+use Hub\Factory\Dht\DhtObjectFactory;
 use Hub\Generic\BaseHubSystem;
 use Hub\Network\Receive\Receivable;
 
index 1cefd96e5f6a9eede53a06e83478e70ccd91bf23..e74527a679144e5dd5edcd850cd453de634ac1af 100644 (file)
@@ -4,6 +4,7 @@ namespace Hub\Handler\Node\Message\Request\NodeList;
 
 // Import application-specific stuff
 use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper;
+use Hub\Factory\Dht\DhtObjectFactory;
 use Hub\Factory\Node\NodeObjectFactory;
 use Hub\Network\Receive\Receivable;
 use Hub\Node\BaseHubNode;
index 51b8e2875330701760e10c1e628edcc994ba7eba..252b7c0eec7287ad2e01284ebb1f38eeb9081241 100644 (file)
@@ -83,7 +83,7 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
                parent::__construct(__CLASS__);
 
                // "Cache" CSV path for faster usage
-               $this->csvFilePath = $this->getConfigInstance()->getConfigEntry('base_path') . '/' . $this->getConfigInstance()->getConfigEntry('crawler_csv_file_path');
+               $this->csvFilePath = $this->getConfigInstance()->getConfigEntry('root_base_path') . '/' . $this->getConfigInstance()->getConfigEntry('crawler_csv_file_path');
 
                // Initialize directory instance
                $directoryInstance = ObjectFactory::createObjectByConfiguredName('directory_class', array($this->csvFilePath));
index 02a0690acbfe1727f1a112e4840859c1337af1aa..107821756ce6dad3a66937a71ae0bece8ac8d686 100644 (file)
@@ -4,6 +4,7 @@ namespace Hub\State\Dht;
 
 // Import application-specific stuff
 use Hub\Dht\Distributable;
+use Hub\Factory\Dht\DhtObjectFactory;
 use Hub\Factory\State\Dht\DhtStateFactory;
 
 // Import framework stuff
index 322c17f799e046cb9ff99f7562c357ebd66a55bf..a80a70e82b0e2fd138923acecb66d25d1cfbe801 100644 (file)
@@ -4,6 +4,7 @@ namespace Hub\State\Dht;
 
 // Import application-specific stuff
 use Hub\Dht\Distributable;
+use Hub\Factory\Dht\DhtObjectFactory;
 use Hub\Factory\State\Dht\DhtStateFactory;
 
 // Import framework stuff
index 04dbe46131bc9748d00c7244821c56ec4fe3c952..22e3c52824db7e6839ca8273d3b473067489f41e 100644 (file)
@@ -93,6 +93,10 @@ class BaseXmlTemplateEngine extends BaseTemplateEngine {
         *                                                                                      read-protected
         */
        protected function initXmlTemplateEngine ($typePrefix, $xmlTemplateType) {
+               // Set XML template type and prefix
+               $this->xmlTemplateType = $xmlTemplateType;
+               $this->typePrefix      = $typePrefix;
+
                // Get template instance
                $applicationInstance = Registry::getRegistry()->getInstance('app');
 
@@ -122,7 +126,10 @@ class BaseXmlTemplateEngine extends BaseTemplateEngine {
                $this->setCodeTemplateExtension($this->getConfigInstance()->getConfigEntry($typePrefix . '_message_template_extension'));
 
                // Absolute output path for compiled templates
-               $this->setCompileOutputPath($this->getConfigInstance()->getConfigEntry('base_path') . $this->getConfigInstance()->getConfigEntry('compile_output_path'));
+               $this->setCompileOutputPath(sprintf('%s%s',
+                       $templateBasePath,
+                       $this->getConfigInstance()->getConfigEntry('compile_output_path')
+               ));
 
                // Init a variable stacker
                $stackInstance = ObjectFactory::createObjectByConfiguredName($typePrefix . '_' . $xmlTemplateType . '_stacker_class');
@@ -136,10 +143,6 @@ class BaseXmlTemplateEngine extends BaseTemplateEngine {
                // Set it
                $this->setStackInstance($stackInstance);
 
-               // Set XML template type and prefix
-               $this->xmlTemplateType = $xmlTemplateType;
-               $this->typePrefix      = $typePrefix;
-
                // Set it in main nodes
                array_push($this->mainNodes, str_replace('_', '-', $xmlTemplateType));
        }
diff --git a/core b/core
index 3e5fae60e3629d3b12cef0bb786f1db7994044ab..7c1f6da0bb508c369410ff7fed93395bd9a9e65a 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit 3e5fae60e3629d3b12cef0bb786f1db7994044ab
+Subproject commit 7c1f6da0bb508c369410ff7fed93395bd9a9e65a
index f0f02f6df124b1ce00ac8d4c18ab96d35d9b7310..61d5347327fde61f06cd9ded6066776cb11dd523 100644 (file)
--- a/index.php
+++ b/index.php
@@ -6,6 +6,7 @@ namespace CoreFramework\EntryPoint;
 use CoreFramework\Bootstrap\FrameworkBootstrap;
 use CoreFramework\Configuration\FrameworkConfiguration;
 use CoreFramework\Factory\ObjectFactory;
+use CoreFramework\Filesystem\FileNotFoundException;
 use CoreFramework\Helper\Application\ApplicationHelper;
 use CoreFramework\Localization\LanguageSystem;
 use CoreFramework\Loader\ClassLoader;