]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/criteria/class_BaseCriteria.php
Continued:
[core.git] / framework / main / classes / criteria / class_BaseCriteria.php
index e9f9a853adf7084d8979c983e60dca7a8130e558..cf250a3f944c76794e083eb5160217d70e10304f 100644 (file)
@@ -5,6 +5,7 @@ namespace Org\Mxchange\CoreFramework\Criteria;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Criteria\Search\SearchCriteria;
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\String\Utils\StringUtils;
 
 /**
  * A general crtieria class
@@ -149,7 +150,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                assert((strpos($criteriaKey, 'my-') === false) && (strpos($criteriaKey, 'my_') === false));
 
                // Convert dashes to underscore
-               $criteriaKey = self::convertDashesToUnderscores($criteriaKey);
+               $criteriaKey = StringUtils::convertDashesToUnderscores($criteriaKey);
 
                // "Walk" through all criterias
                foreach ($this->getGenericArray('criteria') as $criteriaType => $dummy) {
@@ -175,7 +176,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                assert((strpos($criteriaKey, 'my-') === false) && (strpos($criteriaKey, 'my_') === false) && (!is_bool($criteriaValue)));
 
                // Convert dashes to underscore
-               $criteriaKey = self::convertDashesToUnderscores($criteriaKey);
+               $criteriaKey = StringUtils::convertDashesToUnderscores($criteriaKey);
 
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey);
@@ -201,7 +202,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                assert((strpos($criteriaKey, 'my-') === false) && (strpos($criteriaKey, 'my_') === false) && (!is_bool($criteriaValue)));
 
                // Convert dashes to underscore
-               $criteriaKey = self::convertDashesToUnderscores($criteriaKey);
+               $criteriaKey = StringUtils::convertDashesToUnderscores($criteriaKey);
 
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey);
@@ -226,7 +227,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteriaValue=' . $criteriaValue);
 
                // Add it
-               $this->pushValueToGenericArrayElement('criteria', 'choice', 'entries', self::convertDashesToUnderscores($criteriaKey), (string) $criteriaValue);
+               $this->pushValueToGenericArrayElement('criteria', 'choice', 'entries', StringUtils::convertDashesToUnderscores($criteriaKey), (string) $criteriaValue);
        }
 
        /**
@@ -271,7 +272,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                assert((strpos($criteriaKey, 'my-') === false) && (strpos($criteriaKey, 'my_') === false));
 
                // Convert dashes to underscore
-               $criteriaKey = self::convertDashesToUnderscores($criteriaKey);
+               $criteriaKey = StringUtils::convertDashesToUnderscores($criteriaKey);
 
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteria()=' . $this->countGenericArrayGroup('criteria', $criteriaType));
@@ -332,7 +333,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        assert((strpos($key, 'my-') === false) && (strpos($key, 'my_') === false));
 
                        // Convert dashes to underscore
-                       $key = self::convertDashesToUnderscores($key);
+                       $key = StringUtils::convertDashesToUnderscores($key);
 
                        // Then walk through all search criteria
                        foreach ($this->getGenericArrayKey('criteria', $criteriaType, 'entries') as $criteriaKey => $criteriaValue) {
@@ -340,7 +341,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                                assert((strpos($criteriaKey, 'my-') === false) && (strpos($criteriaKey, 'my_') === false) && (!is_bool($criteriaValue)));
 
                                // Convert dashes to underscore
-                               $criteriaKey = self::convertDashesToUnderscores($criteriaKey);
+                               $criteriaKey = StringUtils::convertDashesToUnderscores($criteriaKey);
 
                                // Is the element found and does it match?
                                if (($key == $criteriaKey) && ($criteriaValue == $entry)) {
@@ -405,7 +406,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        assert(!is_array($criteriaValue));
 
                        // Convert dashes to underscore
-                       $criteriaKey = self::convertDashesToUnderscores($criteriaKey);
+                       $criteriaKey = StringUtils::convertDashesToUnderscores($criteriaKey);
 
                        // Is the value in array or is $onlyKeys empty?
                        if ((isset($onlyKeys[$criteriaKey])) || (count($onlyKeys) == 0)) {