]> 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 4452760a6f3bf58b513478c358cfe5d8dda324a8..cf250a3f944c76794e083eb5160217d70e10304f 100644 (file)
@@ -5,17 +5,14 @@ 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
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
-<<<<<<< HEAD:framework/main/classes/criteria/class_BaseCriteria.php
  * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
-=======
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2016 Core Developer Team
->>>>>>> Some updates::inc/main/classes/criteria/class_BaseCriteria.php
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -153,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) {
@@ -179,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);
@@ -205,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);
@@ -230,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);
        }
 
        /**
@@ -275,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));
@@ -336,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) {
@@ -344,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)) {
@@ -409,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)) {