From: Roland Haeder Date: Sat, 25 Feb 2017 15:58:18 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3493ca0979684fe2704ff9c0548ee3945b5244a1;p=core.git Continued: - added missing config entry - expanded config entry local_file_database_class with namespace - need to load inc/database.php (which will later also be rewritten to an OOPed way) - added "import" of FrameworkDatabase - added "import" of BaseDatabaseBackend - added "import" of DatabaseBackend - added "import" of StoreableCriteria Signed-off-by: Roland Häder --- diff --git a/application/tests/config.php b/application/tests/config.php index a4e6d863..dbe5aa71 100644 --- a/application/tests/config.php +++ b/application/tests/config.php @@ -47,3 +47,6 @@ $cfg->setConfigEntry('news_process_filter', 'CoreFramework\Filter\News\NewsProce // CFG: NEWS-READER-MAIN-CLASS $cfg->setConfigEntry('news_reader_main_class', 'CoreFramework\Reader\News\Console\ConsoleNewsReader'); + +// CFG: NEWS-MAIN-LIMIT +$cfg->setConfigEntry('news_main_limit', 5); diff --git a/application/tests/init.php b/application/tests/init.php index b877adab..00cf2f4d 100644 --- a/application/tests/init.php +++ b/application/tests/init.php @@ -30,3 +30,7 @@ ClassLoader::scanApplicationClasses(); // Get config instance $cfg = FrameworkConfiguration::getSelfInstance(); + +// 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'); diff --git a/inc/config.php b/inc/config.php index 81f92efa..262c606d 100644 --- a/inc/config.php +++ b/inc/config.php @@ -338,7 +338,7 @@ $cfg->setConfigEntry('stacker_generic_max_size', 100); $cfg->setConfigEntry('stacker_current_node_max_size', 20); // CFG: LOCAL-FILE-DATABASE-CLASS -$cfg->setConfigEntry('local_file_database_class', 'CachedLocalFileDatabase'); +$cfg->setConfigEntry('local_file_database_class', 'CoreFramework\Database\Backend\Lfdb\CachedLocalFileDatabase'); // CFG: COMPRESSOR-CHANNEL-CLASS $cfg->setConfigEntry('compressor_channel_class', 'CompressorChannel'); diff --git a/inc/main/classes/class_BaseFrameworkSystem.php b/inc/main/classes/class_BaseFrameworkSystem.php index f6c51c55..fdf7aab2 100644 --- a/inc/main/classes/class_BaseFrameworkSystem.php +++ b/inc/main/classes/class_BaseFrameworkSystem.php @@ -6,6 +6,7 @@ namespace CoreFramework\Object; use CoreFramework\Configuration\FrameworkConfiguration; use CoreFramework\Controller\Controller; use CoreFramework\Criteria\Criteria; +use CoreFramework\Criteria\Local\LocalSearchCriteria; use CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory; use CoreFramework\Factory\ObjectFactory; use CoreFramework\Generic\FrameworkInterface; diff --git a/inc/main/classes/criteria/dataset/class_DataSetCriteria.php b/inc/main/classes/criteria/dataset/class_DataSetCriteria.php index aefa162d..867e6551 100644 --- a/inc/main/classes/criteria/dataset/class_DataSetCriteria.php +++ b/inc/main/classes/criteria/dataset/class_DataSetCriteria.php @@ -4,6 +4,7 @@ namespace CoreFramework\Criteria\DataSet; // Import framework stuff use CoreFramework\Criteria\BaseCriteria; +use CoreFramework\Criteria\Storing\StoreableCriteria; /** * A set of data storeable in databases diff --git a/inc/main/classes/criteria/search/class_SearchCriteria.php b/inc/main/classes/criteria/search/class_SearchCriteria.php index 0f665999..58e0b5e7 100644 --- a/inc/main/classes/criteria/search/class_SearchCriteria.php +++ b/inc/main/classes/criteria/search/class_SearchCriteria.php @@ -4,6 +4,7 @@ namespace CoreFramework\Criteria\Search; // Import framework stuff use CoreFramework\Criteria\BaseCriteria; +use CoreFramework\Criteria\Local\LocalSearchCriteria; /** * Search criteria for e.g. searching in databases. Do not use this class if diff --git a/inc/main/classes/database/backend/class_CachedLocalFileDatabase.php b/inc/main/classes/database/backend/class_CachedLocalFileDatabase.php index 3bdebd3d..fac9b9ea 100644 --- a/inc/main/classes/database/backend/class_CachedLocalFileDatabase.php +++ b/inc/main/classes/database/backend/class_CachedLocalFileDatabase.php @@ -4,6 +4,10 @@ namespace CoreFramework\Database\Backend\Lfdb; // Import framework stuff use CoreFramework\Criteria\Criteria; +use CoreFramework\Criteria\Local\LocalSearchCriteria; +use CoreFramework\Criteria\Storing\StoreableCriteria; +use CoreFramework\Database\Backend\BaseDatabaseBackend; +use CoreFramework\Database\Backend\DatabaseBackend; use CoreFramework\Factory\ObjectFactory; use CoreFramework\Generic\FrameworkException; diff --git a/inc/main/classes/database/class_BaseDatabaseBackend.php b/inc/main/classes/database/class_BaseDatabaseBackend.php index c844647d..fb3bab62 100644 --- a/inc/main/classes/database/class_BaseDatabaseBackend.php +++ b/inc/main/classes/database/class_BaseDatabaseBackend.php @@ -3,6 +3,7 @@ namespace CoreFramework\Database\Backend; // Import framework stuff +use CoreFramework\Database\Backend\DatabaseBackend; use CoreFramework\Generic\FrameworkException; use CoreFramework\Object\BaseFrameworkSystem; diff --git a/inc/main/classes/database/class_BaseDatabaseResult.php b/inc/main/classes/database/class_BaseDatabaseResult.php index cba50e4b..3d598db4 100644 --- a/inc/main/classes/database/class_BaseDatabaseResult.php +++ b/inc/main/classes/database/class_BaseDatabaseResult.php @@ -8,7 +8,7 @@ use CoreFramework\Object\BaseFrameworkSystem; /** * A general class for database results * - * @see DatabaseBackendInterface - An interface for database backends + * @see DatabaseBackend - An interface for database backends * @author Roland Haeder * @version 0.0.0 * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team diff --git a/inc/main/classes/database/class_BaseDatabaseWrapper.php b/inc/main/classes/database/class_BaseDatabaseWrapper.php index 5a6faf62..66b1f79e 100644 --- a/inc/main/classes/database/class_BaseDatabaseWrapper.php +++ b/inc/main/classes/database/class_BaseDatabaseWrapper.php @@ -4,6 +4,8 @@ namespace CoreFramework\Database\Wrapper; // Import framework stuff use CoreFramework\Criteria\Criteria; +use CoreFramework\Criteria\Storing\StoreableCriteria; +use CoreFramework\Database\Backend\BaseDatabaseBackend; use CoreFramework\Factory\ObjectFactory; use CoreFramework\Object\BaseFrameworkSystem; diff --git a/inc/main/classes/database/result/class_CachedDatabaseResult.php b/inc/main/classes/database/result/class_CachedDatabaseResult.php index 4489c44b..15293b6a 100644 --- a/inc/main/classes/database/result/class_CachedDatabaseResult.php +++ b/inc/main/classes/database/result/class_CachedDatabaseResult.php @@ -3,6 +3,9 @@ namespace CoreFramework\Database\Result; // Import framework stuff +use CoreFramework\Criteria\Local\LocalSearchCriteria; +use CoreFramework\Criteria\Storing\StoreableCriteria; +use CoreFramework\Database\Backend\BaseDatabaseBackend; use CoreFramework\Request\Requestable; /** diff --git a/inc/main/classes/handler/class_BaseHandler.php b/inc/main/classes/handler/class_BaseHandler.php index e0a0d006..945ebeb6 100644 --- a/inc/main/classes/handler/class_BaseHandler.php +++ b/inc/main/classes/handler/class_BaseHandler.php @@ -3,6 +3,7 @@ namespace CoreFramework\Handler; // Import framework stuff +use CoreFramework\Criteria\Storing\StoreableCriteria; use CoreFramework\Object\BaseFrameworkSystem; /** diff --git a/inc/main/classes/points/class_UserPoints.php b/inc/main/classes/points/class_UserPoints.php index b3f836e5..0961a489 100644 --- a/inc/main/classes/points/class_UserPoints.php +++ b/inc/main/classes/points/class_UserPoints.php @@ -3,6 +3,7 @@ namespace CoreFramework\User\Point; // Import framework stuff +use CoreFramework\Criteria\Storing\StoreableCriteria; use CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory; use CoreFramework\Factory\ObjectFactory; use CoreFramework\Object\BaseFrameworkSystem; diff --git a/inc/main/interfaces/criteria/extended/class_AddableCriteria.php b/inc/main/interfaces/criteria/extended/class_AddableCriteria.php index ed6b6f4f..fbc9fc4f 100644 --- a/inc/main/interfaces/criteria/extended/class_AddableCriteria.php +++ b/inc/main/interfaces/criteria/extended/class_AddableCriteria.php @@ -3,6 +3,7 @@ namespace CoreFramework\Criteria; // Import framework stuff +use CoreFramework\Criteria\Storing\StoreableCriteria; use CoreFramework\Generic\FrameworkInterface; use CoreFramework\Request\Requestable; diff --git a/inc/main/interfaces/criteria/extended/class_StoreableCriteria.php b/inc/main/interfaces/criteria/extended/class_StoreableCriteria.php index 5515265b..3fa2f978 100644 --- a/inc/main/interfaces/criteria/extended/class_StoreableCriteria.php +++ b/inc/main/interfaces/criteria/extended/class_StoreableCriteria.php @@ -1,6 +1,6 @@