]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Tue, 16 Jan 2018 23:20:58 +0000 (00:20 +0100)
committerRoland Häder <roland@mxchange.org>
Tue, 16 Jan 2018 23:20:58 +0000 (00:20 +0100)
- 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 <roland@mxchange.org>
framework/main/classes/database/frontend/class_UserDatabaseWrapper.php
framework/main/classes/database/frontend/class_UserPointsDatabaseWrapper.php
framework/main/classes/database/result/class_CachedDatabaseResult.php
framework/main/classes/points/class_UserPoints.php
framework/main/interfaces/criteria/extended/class_AddableCriteria.php

index 3852df57f675bf67cb4955f7507dfd73143be36c..9ed16737a210e71fd2b7f2d5ea2f4f20ce1a0e9c 100644 (file)
@@ -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);
index 34aa6d4b52debfd1dba16663d0115771aefe0362..d9242d8aa8b60e547b6da819533a2191726fc8ee 100644 (file)
@@ -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());
index ab2ea47a6106b046fa603c33ef4911e73753d7a4..6c36cdc04c6004f510e769dc7a7637c64386037f 100644 (file)
@@ -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?
index b23a6f96ee6bfb1a03a6782ed0af195800fcf736..786446c60bf3bc95bfa3fa96e987eb4b8e324113 100644 (file)
@@ -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());
 
index c965cc13f3148bf7f986de334e97b49abffa8878..df52c7e1fb1047842d0ebde1b6dfbc649dc5f1d2 100644 (file)
@@ -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);
 
 }