- // Get criteria element
- $criteria = $criteriaInstance->getCriteriaElemnent($key);
-
- // Is the criteria met?
- if ((!is_null($criteria)) && ($criteria == $value)) {
-
- // Shall we skip this entry?
- if ($criteriaInstance->getSkip() > 0) {
- // We shall skip some entries
- if ($skipFound < $criteriaInstance->getSkip()) {
- // Skip this entry
- $skipFound++;
- break;
- } // END - if
+ // Make sure value is not bool
+ assert(!is_bool($value));
+
+ // Found one entry?
+ $isFound = (($isFound === TRUE) && ($searchInstance->isCriteriaMatching($key, $value)));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: key=' . $key . ',value=' . $value . ',isFound=' . intval($isFound));
+ } // END - foreach
+
+ // Is all found?
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: isFound=' . intval($isFound) . ',limitFound=' . $limitFound . ',limit=' . $searchInstance->getLimit());
+ if ($isFound === TRUE) {
+ // Shall we skip this entry?
+ if ($searchInstance->getSkip() > 0) {
+ // We shall skip some entries
+ if ($skipFound < $searchInstance->getSkip()) {
+ // Skip this entry
+ $skipFound++;
+ break;