GUMP::filter_noise_words PHP Method

filter_noise_words() protected method

Usage: '' => 'noise_words'
protected filter_noise_words ( string $value, array $params = null ) : string
$value string
$params array
return string
    protected function filter_noise_words($value, $params = null)
    {
        $value = preg_replace('/\\s\\s+/u', chr(32), $value);
        $value = " {$value} ";
        $words = explode(',', self::$en_noise_words);
        foreach ($words as $word) {
            $word = trim($word);
            $word = " {$word} ";
            // Normalize
            if (stripos($value, $word) !== false) {
                $value = str_ireplace($word, chr(32), $value);
            }
        }
        return trim($value);
    }