Enable or disable the query debug features

@param boolean $value True to enable debug (default), false to disable it
506003
public function useDebug($value = true)
    {
        if ($value) {
            $this->configureStatementClass('DebugPDOStatement', true);
        } else {
            // reset query logging
            $this->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('PDOStatement'));
            $this->setLastExecutedQuery('');
            $this->queryCount = 0;
        }
        $this->clearStatementCache();
        $this->useDebug = $value;
    }
1013252
public static function display_debugging_messages($return = false) {
        if (empty(self::$debuggings)) {
            return false;
        }

        $debugstring = '';
        foreach(self::$debuggings as $debug) {
            $debugstring .= 'Debugging: ' . $debug->message . "\n" . trim($debug->from) . "\n";
        }

        if ($return) {
            return $debugstring;
        }
        echo $debugstring;
        return true;
    }
159800
public static function isBooleanValue(string $value): bool
    {
        return in_array(strtolower(trim($value)), StringUtils::TRUES) || in_array(strtolower(trim($value)), StringUtils::FALSES);
    }
954901
private function debugQuery(QueryDebugger $queryDebugger = null)
    {
        if ($queryDebugger === null) {
            return;
        }

        $queryDebugger->stop();

        $this->getConfiguration()->getEventDispatcher()->dispatch(
            Events::QUERY_DEBUG,
            new QueryDebugEvent($queryDebugger)
        );
    }
505780
private function check($value) {

		$values = ['yes', 'on', '1', 'true'];
		
		if(true === is_string($value)) {
			return true === in_array($value, $values);
		}

		return false;
	}
405760
public function debug($value, ...$args) {
        return call_user_func_array(
            [__CLASS__, 'event'],
            array_merge([self::DEBUG, $value], $args)
        );
    }
264585
public static function setIsDebug(bool $bool): void
    {
        if (self::isCliApp()) {
            self::$IS_DEBUG = $bool;
        } else {
            MSession::set(MCoreApplication::DEBUG, $bool);
        }
    }
648069
private function hasQueryOperators($value) : bool
    {
        if (! is_array($value) && ! is_object($value)) {
            return false;
        }

        if (is_object($value)) {
            $value = get_object_vars($value);
        }

        foreach ($value as $key => $_) {
            if (isset($key[0]) && $key[0] === '$') {
                return true;
            }
        }

        return false;
    }
1271484
protected function castToBool($value, bool $nullable = true)
    {
        if (null === $value && $nullable) {
            return null;
        }

        return (bool) $value;
    }
1307086
public function filterBoolean($value)
    {
        if ($value === null) {
            return null;
        }
        $booleanFormat = [
            $this->booleanFormat[0] => false, $this->booleanFormat[1] => true,
            'false'                 => false, 'true' => true,
            '0'                     => false, '1' => true,
            ''                      => false,
        ];
        $map = [];
        foreach ($booleanFormat as $label => $key) {
            $label = mb_strtolower($label, 'UTF-8');
            $map[$label] = $key;
            if (mb_strlen($label, 'UTF-8') > 1) {
                $map[mb_substr($label, 0, 1, 'UTF-8')] = $key;
            }
        }
        $value = mb_strtolower($value, 'UTF-8');

        return !isset($map[$value]) ? null : (int)$map[$value];
    }
393116
private function boolishToFlag($value): bool
    {
        switch (true) {
            case 'true' === $value:
            case true === $value:
            case 'yes' === $value:
                return true;
            case 'no' === $value:
            case 'false' === $value:
            case false === $value:
                return false;
            default:
                throw new \InvalidArgumentException('Invalid value for remove-obsolete flag.');
        }
    }
449291
public function debugQuery($replaced = true) {
        $q = $this->queryString;

        if (!$replaced) {
            return $q;
        }
        else {
            if (count($this->_debugBindValues) > 0) {
                return preg_replace_callback('/:([0-9a-z_]+)/i', [$this, '_debugReplaceBindValue'], $q);
            }
            else {
                return $q;
            }
        }
    }
1283582
public function displayValue( $value )
    {
        if ( ! is_bool( $value ) )
        {
            $value = (string) $value;
        }
        
        return ( in_array( $value, $this->validTrues, true ) )
                ? self::TRUE : self::FALSE;
    }
1077059
private function isStringDQLQuery($value)
    {
        $keysWord = array(
            "SELECT ",
            " FROM ",
            " WHERE "
        );

        foreach ($keysWord as $keyWord) {
            if (stripos($value, $keyWord) !== false) {
                return true;
            }
        }

        return false;
    }
513025
private static function boolval($value)
    {
        if (is_numeric($value)) {
            $value = (float) $value > 0;
        } elseif (is_string($value)) {
            $value = 'false' !== $value;
        }

        return is_bool($value) ? $value : false;
    }
427193
private function bindDataType($value)
    {
        switch (true) {
            case is_string($value):
                return PDO::PARAM_STR;
            case is_int($value):
                return PDO::PARAM_INT;
            case is_bool($value):
                return PDO::PARAM_BOOL;
            case is_null($value):
                return PDO::PARAM_NULL;
            default:
                return false;
        }
    }
434612
public function setCheck($value)
    {
        $check = StringHelper::booleanValue($value);
        $this->check = $check;
        if ($check) {
            $this->flags .= ' --check ';
        } else {
            $this->flags = str_replace(' --check ', '', $this->flags);
        }
    }