$_instance
$_instance : object
Plugin singleton
getRedactedContent( $strContent) : array
Accepts a string to have content redacted. Queries the database for matching redactions and returns a multidimensional array of content, redacted content, pattern, and permissions. Each row in the array was a matching redaction rule in the database.
$strContent |
$arrMatches The matches array for filtering content.
_getMatchingStringsAndPermissions(array $dbMatchingRows, string $strContent) : array
Translates the raw rows of the database and string content into a redaction array of matching text and the permissions around the redaction. The array is in the form of array(matches[], permissions, redacted[], pattern) foreach matching row of the database.
array | $dbMatchingRows | Raw rows from the database |
string | $strContent | String content to match against. |
$arrResults An array of results in the form of array(matches[], permissions[] , redacted[]) foreach matching row of the database.
_convertToRedactStrings(array $arrMatches) : array
Accepts an array of strings and translates them into what should be used as the redacted text. This returns redacted versions of the content no matter what the permissions are.
array | $arrMatches | The array of strings that are content that matches redacted text. |
$arrRedacted The array of strings translated into what should be used as redacted text.