From: Roland Häder Date: Tue, 16 Jan 2018 23:20:58 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3f60291bf648c4a72a10c5598623c5736976346a;p=core.git Continued: - removed Requestable instance from parameter list, this can now be done easier with FrameworkBootstrap::getInstance() rather than handling the instance around in many places (see inter-mezzo) Signed-off-by: Roland Häder --- diff --git a/framework/main/classes/database/frontend/class_UserDatabaseWrapper.php b/framework/main/classes/database/frontend/class_UserDatabaseWrapper.php index 3852df57..9ed16737 100644 --- a/framework/main/classes/database/frontend/class_UserDatabaseWrapper.php +++ b/framework/main/classes/database/frontend/class_UserDatabaseWrapper.php @@ -87,7 +87,7 @@ class UserDatabaseWrapper extends BaseDatabaseWrapper implements ManageableAccou $dataSetInstance->setUniqueKey(self::DB_COLUMN_USERNAME); // Add registration elements to the dataset - $registrationInstance->addElementsToDataSet($dataSetInstance, NULL); + $registrationInstance->addElementsToDataSet($dataSetInstance); // "Insert" this request instance completely into the database $this->queryInsertDataSet($dataSetInstance); @@ -135,7 +135,7 @@ class UserDatabaseWrapper extends BaseDatabaseWrapper implements ManageableAccou $dataSetInstance->setUniqueKey(self::DB_COLUMN_USERNAME); // Add all update criteria to the database set - $resultInstance->addElementsToDataSet($dataSetInstance, NULL); + $resultInstance->addElementsToDataSet($dataSetInstance); // "Update" this request with the database $this->getDatabaseInstance()->queryUpdateDataSet($dataSetInstance); diff --git a/framework/main/classes/database/frontend/class_UserPointsDatabaseWrapper.php b/framework/main/classes/database/frontend/class_UserPointsDatabaseWrapper.php index 34aa6d4b..d9242d8a 100644 --- a/framework/main/classes/database/frontend/class_UserPointsDatabaseWrapper.php +++ b/framework/main/classes/database/frontend/class_UserPointsDatabaseWrapper.php @@ -86,7 +86,7 @@ class UserPointsDatabaseWrapper extends BaseDatabaseWrapper implements BookableP $dataSetInstance->setUniqueKey(self::DB_COLUMN_POINTS_UID); // Add registration elements to the dataset - $pointsInstance->addElementsToDataSet($dataSetInstance, NULL); + $pointsInstance->addElementsToDataSet($dataSetInstance); // "Insert" this request instance completely into the database $this->queryInsertDataSet($dataSetInstance); @@ -103,7 +103,7 @@ class UserPointsDatabaseWrapper extends BaseDatabaseWrapper implements BookableP $dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_USER_POINTS)); // Add all update criteria to the database set - $resultInstance->addElementsToDataSet($dataSetInstance, NULL); + $resultInstance->addElementsToDataSet($dataSetInstance); // Add seach criteria $dataSetInstance->setSearchInstance($resultInstance->getUpdateInstance()->getSearchInstance()); diff --git a/framework/main/classes/database/result/class_CachedDatabaseResult.php b/framework/main/classes/database/result/class_CachedDatabaseResult.php index ab2ea47a..6c36cdc0 100644 --- a/framework/main/classes/database/result/class_CachedDatabaseResult.php +++ b/framework/main/classes/database/result/class_CachedDatabaseResult.php @@ -8,7 +8,6 @@ use Org\Mxchange\CoreFramework\Criteria\Local\LocalUpdateCriteria; use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria; use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseWrapper; use Org\Mxchange\CoreFramework\Database\Backend\BaseDatabaseBackend; -use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Result\Search\SearchableResult; use Org\Mxchange\CoreFramework\Result\Update\UpdateableResult; @@ -350,10 +349,9 @@ class CachedDatabaseResult extends BaseDatabaseResult implements SearchableResul * Adds registration elements to a given dataset instance * * @param $criteriaInstance An instance of a StoreableCriteria class - * @param $requestInstance An instance of a Requestable class * @return void */ - public function addElementsToDataSet (StoreableCriteria $criteriaInstance, Requestable $requestInstance = NULL) { + public function addElementsToDataSet (StoreableCriteria $criteriaInstance) { // Walk only through out-dated columns foreach ($this->outDated as $key => $dummy) { // Does this key exist? diff --git a/framework/main/classes/points/class_UserPoints.php b/framework/main/classes/points/class_UserPoints.php index b23a6f96..786446c6 100644 --- a/framework/main/classes/points/class_UserPoints.php +++ b/framework/main/classes/points/class_UserPoints.php @@ -8,7 +8,6 @@ use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem; use Org\Mxchange\CoreFramework\Registry\Registerable; -use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\User\ManageableAccount; /** @@ -179,11 +178,10 @@ class UserPoints extends BaseFrameworkSystem implements Registerable, BookablePo * Adds registration elements to a given dataset instance * * @param $criteriaInstance An instance of a StoreableCriteria class - * @param $requestInstance An instance of a Requestable class * @return void * @todo $requestInstance is currently unused */ - public function addElementsToDataSet (StoreableCriteria $criteriaInstance, Requestable $requestInstance = NULL) { + public function addElementsToDataSet (StoreableCriteria $criteriaInstance) { // Add user id $criteriaInstance->addCriteria(UserPointsDatabaseWrapper::DB_COLUMN_POINTS_UID, $this->getUserInstance()->getUserId()); diff --git a/framework/main/interfaces/criteria/extended/class_AddableCriteria.php b/framework/main/interfaces/criteria/extended/class_AddableCriteria.php index c965cc13..df52c7e1 100644 --- a/framework/main/interfaces/criteria/extended/class_AddableCriteria.php +++ b/framework/main/interfaces/criteria/extended/class_AddableCriteria.php @@ -5,7 +5,6 @@ namespace Org\Mxchange\CoreFramework\Criteria\Add; // Import framework stuff use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria; use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; -use Org\Mxchange\CoreFramework\Request\Requestable; /** * An interface for classes which are allowed to add criteria @@ -34,9 +33,8 @@ interface AddableCriteria extends FrameworkInterface { * Adds registration elements to a given dataset instance * * @param $criteriaInstance An instance of a StoreableCriteria class - * @param $requestInstance An instance of a Requestable class * @return void */ - function addElementsToDataSet (StoreableCriteria $criteriaInstance, Requestable $requestInstance = NULL); + function addElementsToDataSet (StoreableCriteria $criteriaInstance); }