developerdino / ProfanityFilter

A simple PHP class to test if a string has a profanity in it.
70 stars 27 forks source link

Extend The Profanity List? #12

Closed jackcsk closed 8 years ago

jackcsk commented 8 years ago

The current implementation loads the profanities from the config/profanities.php. Suggest to add the option to load the list by passing in variable, so that users can add / manage the profanity list from their application (e.g. load from db)

developerdino commented 8 years ago

Hi @jackcsk,

Thanks for the suggestion but you might find you can already do that - please check out https://github.com/mofodojodino/ProfanityFilter/blob/develop/src/mofodojodino/ProfanityFilter/Check.php#L151-L153 as you can pass your own profanity file in which will override the standard one.

If you would like to pass in an array instead of a file I'm happy to except a pull request with the changes.

Cheers Dino

jackcsk commented 8 years ago

Thx @mofodojodino . I've submitted the pull request.