censor() публичный статический Метод

Censor a single word or an array of words within a string
public static censor ( string $strString, mixed $varWords, string $strReplace = '' ) : string
$strString string The string to censor
$varWords mixed A string or array or words to replace
$strReplace string An optional replacement string
Результат string The cleaned string
 /**
  * Censor a single word or an array of words within a string.
  *
  * @param string $strString  The string to censor.
  *
  * @param mixed  $varWords   A string or array or words to replace.
  *
  * @param string $strReplace An optional replacement string.
  *
  * @return string The cleaned string
  */
 public static function censor($strString, $varWords, $strReplace = '')
 {
     if (self::isStringUtilAvailable()) {
         return StringUtil::censor($strString, $varWords, $strReplace);
     }
     return \Contao\String::censor($strString, $varWords, $strReplace);
 }