// 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
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) {
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);
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);
//* 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);
}
/**
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));
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) {
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)) {
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)) {