vBulletin v6.1.0

vB_Utility_WordList
in package
uses vB_Utility_Trait_NoSerialize

Table of Contents

Methods

__serialize()  : array<string|int, mixed>
__sleep()  : array<string|int, mixed>
__unserialize()  : void
__wakeup()  : void
censor()  : string
Replaces any instances of words censored in the text with replacechar
createFromText()  : self
getMatchedWords()  : array<string|int, mixed>
isMatch()  : bool

Methods

__serialize()

public __serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

__sleep()

public __sleep() : array<string|int, mixed>
Return values
array<string|int, mixed>

__unserialize()

public __unserialize(mixed $serialized) : void
Parameters
$serialized : mixed

censor()

Replaces any instances of words censored in the text with replacechar

public censor(string $text, string $replacechar) : string
Parameters
$text : string
$replacechar : string

-- the string to replace each character of a censored word with generally assumed to be a single character but there isn't any dependency on that (and I don't think the option that we generally use explicitly requires a single character). You can pass an empty string to strip the censored word instead of replacing it.

Return values
string

getMatchedWords()

public getMatchedWords(string $text) : array<string|int, mixed>
Parameters
$text : string
Return values
array<string|int, mixed>

isMatch()

public isMatch(string $text) : bool
Parameters
$text : string
Return values
bool

        
On this page

Search results