Fixed and continued:
authorRoland Haeder <roland@mxchange.org>
Sat, 25 Feb 2017 16:30:42 +0000 (17:30 +0100)
committerRoland Haeder <roland@mxchange.org>
Tue, 28 Feb 2017 21:10:04 +0000 (22:10 +0100)
- need to call ApplicationHelper::createDebugInstance() before inc/database.php
  is being loaded. This is old way anyway and will be rewritten right after this
  rewrite.
- added "import" of CachedDatabaseResult and moved it to better namespace
- added "import of SearchableResult
- fixed config entry for it
- first BaseDatabaseResult is a result, then it is for databases (queries)

Signed-off-by: Roland H├Ąder <roland@mxchange.org>
application/tests/init.php
inc/config.php
inc/main/classes/class_BaseFrameworkSystem.php
inc/main/classes/database/class_BaseDatabaseResult.php
inc/main/classes/database/result/class_CachedDatabaseResult.php
inc/main/classes/user/class_BaseUser.php
inc/main/interfaces/result/class_SearchableResult.php
inc/main/middleware/database/class_DatabaseConnection.php

index 00cf2f4..188d06a 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 // Import framework stuff
 use CoreFramework\Configuration\FrameworkConfiguration;
+use CoreFramework\Helper\Application\ApplicationHelper;
 use CoreFramework\Loader\ClassLoader;
 
 /**
@@ -31,6 +32,9 @@ ClassLoader::scanApplicationClasses();
 // Get config instance
 $cfg = FrameworkConfiguration::getSelfInstance();
 
+// Initialize output system
+ApplicationHelper::createDebugInstance('ApplicationHelper');
+
 // This application needs a database connection then we have to simply include
 // the inc/database.php script
 require($cfg->getConfigEntry('base_path') . 'inc/database.php');
index b33f3d3..bd6ef83 100644 (file)
@@ -182,7 +182,7 @@ $cfg->setConfigEntry('update_criteria_class', 'UpdateCriteria');
 $cfg->setConfigEntry('file_io_class', 'CoreFramework\Handler\Filesystem\FileIoHandler');
 
 // CFG: DATABASE-RESULT-CLASS
-$cfg->setConfigEntry('database_result_class', 'CachedDatabaseResult');
+$cfg->setConfigEntry('database_result_class', 'CoreFramework\Result\Database\CachedDatabaseResult');
 
 // CFG: FILTER-CHAIN-CLASS
 $cfg->setConfigEntry('filter_chain_class', 'CoreFramework\Chain\Filter\FilterChain');
index f306b32..e4c0366 100644 (file)
@@ -23,6 +23,8 @@ use CoreFramework\Registry\Register;
 use CoreFramework\Registry\Registry;
 use CoreFramework\Request\Requestable;
 use CoreFramework\Resolver\Resolver;
+use CoreFramework\Result\Database\CachedDatabaseResult;
+use CoreFramework\Result\Search\SearchableResult;
 use CoreFramework\Response\Responseable;
 use CoreFramework\Stream\Output\OutputStreamer;
 use CoreFramework\Template\CompileableTemplate;
index 3d598db..eac2e34 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // Own namespace
-namespace CoreFramework\Database\Result;
+namespace CoreFramework\Result\Database;
 
 // Import framework stuff
 use CoreFramework\Object\BaseFrameworkSystem;
index 15293b6..40b2c3c 100644 (file)
@@ -1,12 +1,13 @@
 <?php
 // Own namespace
-namespace CoreFramework\Database\Result;
+namespace CoreFramework\Result\Database;
 
 // Import framework stuff
 use CoreFramework\Criteria\Local\LocalSearchCriteria;
 use CoreFramework\Criteria\Storing\StoreableCriteria;
 use CoreFramework\Database\Backend\BaseDatabaseBackend;
 use CoreFramework\Request\Requestable;
+use CoreFramework\Result\Search\SearchableResult;
 
 /**
  * A database result class
index f4732f2..c7144f9 100644 (file)
@@ -6,6 +6,7 @@ namespace CoreFramework\User;
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Object\BaseFrameworkSystem;
 use CoreFramework\Request\Requestable;
+use CoreFramework\Result\Search\SearchableResult;
 
 /**
  * A general user class
index 611231f..6d86645 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // Own namespace
-namespace CoreFramework\Database\Result;
+namespace CoreFramework\Result\Search;
 
 // Import framework stuff
 use CoreFramework\Criteria\Local\LocalSearchCriteria;
index 9c53959..7d7686a 100644 (file)
@@ -67,6 +67,7 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Re
         *
         * @param       $debugInstance  An instance of a DebugMiddleware class
         * @param       $dbLayer                An instance of a DatabaseBackend class
+        * @todo        $debugInstance is currently not used
         */
        public static final function createDatabaseConnection (DebugMiddleware $debugInstance, DatabaseBackend $dbLayer) {
                // Get instance