Class Socialveo\Core\library\BadWordsFilter

InheritanceSocialveo\Core\library\BadWordsFilter

Class BadWordsFilter

Public Methods

Hide inherited methods

MethodDescriptionDefined By
createWordPattern() Create filter from word Socialveo\Core\library\BadWordsFilter
filter() Filter bad words Socialveo\Core\library\BadWordsFilter

Method Details

createWordPattern() public static method

Create filter from word

public static string createWordPattern ( $word )
$word
filter() public static method

Filter bad words

public static boolean filter ( $text, &$detectedBadWords = [], $cancelOnFirstMatch false )
$text string
$detectedBadWords array

[optional]

$cancelOnFirstMatch boolean

[optional] Default is false

throws Socialveo\Core\exceptions\BadWordException