X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Fdatabase%2Fresult%2Fclass_CachedDatabaseResult.php;h=12593ac5a8436a684e768b2a6fc50ce56c0e041c;hp=9c2586c974c5c222937514244de8a2b67e320b0f;hb=1956ac6a5f89588c5cf1e10c0cbd0a14915c4646;hpb=78a010fef84895720e796842208f01dfb619c332 diff --git a/framework/main/classes/database/result/class_CachedDatabaseResult.php b/framework/main/classes/database/result/class_CachedDatabaseResult.php index 9c2586c9..12593ac5 100644 --- a/framework/main/classes/database/result/class_CachedDatabaseResult.php +++ b/framework/main/classes/database/result/class_CachedDatabaseResult.php @@ -1,18 +1,18 @@ valid()) { // Next entry found, so count one up and cache it $this->currentPos++; $this->currentRow = $this->resultArray[BaseDatabaseBackend::RESULT_INDEX_ROWS][$this->currentPos]; - $nextValid = TRUE; + $nextValid = true; } // END - if // Return the result @@ -197,7 +207,7 @@ class CachedDatabaseResult extends BaseDatabaseResult implements SearchableResul */ public function valid () { // By default nothing is valid - $isValid = FALSE; + $isValid = false; // Debug message //*NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] this->currentPos=' . $this->currentPos); @@ -205,7 +215,7 @@ class CachedDatabaseResult extends BaseDatabaseResult implements SearchableResul // Check if all is fine ... if (($this->ifStatusIsOkay()) && (isset($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_ROWS][($this->currentPos + 1)])) && (isset($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_ROWS][0]))) { // All fine! - $isValid = TRUE; + $isValid = true; } // END - if // Return the result @@ -249,7 +259,7 @@ class CachedDatabaseResult extends BaseDatabaseResult implements SearchableResul */ public function rewind () { $this->currentPos = -1; - $this->currentRow = array(); + $this->currentRow = []; } /** @@ -350,10 +360,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? @@ -373,7 +382,7 @@ class CachedDatabaseResult extends BaseDatabaseResult implements SearchableResul */ public function find ($key) { // By default nothing is found - $found = FALSE; + $found = false; // Rewind the pointer $this->rewind(); @@ -389,7 +398,7 @@ class CachedDatabaseResult extends BaseDatabaseResult implements SearchableResul // Is the element there? if (isset($currentEntry[$key])) { // Okay, found! - $found = TRUE; + $found = true; // So "cache" it $this->foundValue = $currentEntry[$key];