From 43ba79ff44859684163d7c3d5a5581ef8a89d352 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Wed, 29 Jul 2015 22:40:52 +0200 Subject: [PATCH] Moved 'result' into 'database' as the actual class is a database result + added (functionless) generic class for it. This generic class will be later be expanded with more functionality. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../database/class_BaseDatabaseResult.php | 38 +++++++++++++++++++ .../main/{ => database}/result/.htaccess | 0 .../result/class_CachedDatabaseResult.php | 2 +- 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 inc/classes/main/database/class_BaseDatabaseResult.php rename inc/classes/main/{ => database}/result/.htaccess (100%) rename inc/classes/main/{ => database}/result/class_CachedDatabaseResult.php (98%) diff --git a/inc/classes/main/database/class_BaseDatabaseResult.php b/inc/classes/main/database/class_BaseDatabaseResult.php new file mode 100644 index 00000000..d41bdcc8 --- /dev/null +++ b/inc/classes/main/database/class_BaseDatabaseResult.php @@ -0,0 +1,38 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class BaseDatabaseResult extends BaseFrameworkSystem { + /** + * Protected constructor + * + * @return void + */ + protected function __construct($class = __CLASS__) { + // Call parent constructor + parent::__construct($class); + } +} + +// [EOF] +?> diff --git a/inc/classes/main/result/.htaccess b/inc/classes/main/database/result/.htaccess similarity index 100% rename from inc/classes/main/result/.htaccess rename to inc/classes/main/database/result/.htaccess diff --git a/inc/classes/main/result/class_CachedDatabaseResult.php b/inc/classes/main/database/result/class_CachedDatabaseResult.php similarity index 98% rename from inc/classes/main/result/class_CachedDatabaseResult.php rename to inc/classes/main/database/result/class_CachedDatabaseResult.php index 5a33bbfc..a2e1d2cd 100644 --- a/inc/classes/main/result/class_CachedDatabaseResult.php +++ b/inc/classes/main/database/result/class_CachedDatabaseResult.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class CachedDatabaseResult extends BaseFrameworkSystem implements SearchableResult, UpdateableResult, SeekableIterator { +class CachedDatabaseResult extends BaseDatabaseResult implements SearchableResult, UpdateableResult, SeekableIterator { // Exception constants const EXCEPTION_INVALID_DATABASE_RESULT = 0x1c0; const EXCEPTION_RESULT_UPDATE_FAILED = 0x1c1; -- 2.30.2