Skip to content

Reference

phil/content-warnings
TypeKindRole
Keyfinal classThe rule of theme and category keys
LocalizedTextfinal readonly classA text by locale, read with fallbacks
Categoryfinal readonly classA group of themes
Themefinal readonly classA theme content can be warned for
Cataloguefinal readonly classThe themes and categories, in order
CatalogueLoaderfinal classBuilds a catalogue from a definition, or applies one onto a catalogue
BaseCataloguefinal classThe base list in six languages
Severitystring-backed enumHow intense a theme is in one piece of content
ContentWarningfinal readonly classOne warning: a theme, a severity, a note
ContentWarningsfinal readonly classThe warnings of a piece of content, kept as an array
Displaystring-backed enumShow, fold or hide
Preferencefinal readonly classA display from a severity on
WarningPreferencesfinal readonly classA reader's preferences, kept as an array
WarningMatcherfinal readonly classDecides for one piece of content and one reader
Decisionfinal readonly classThe display of a piece of content and the warnings that gave it
Exception\ContentWarningsExceptioninterfaceEvery exception of the library
Exception\InvalidCataloguefinal class, InvalidArgumentExceptionA definition, a key or a label that breaks a rule
Exception\InvalidWarningfinal class, InvalidArgumentExceptionA warning, a list or a preference that breaks a rule
Exception\UnreadableWarningsfinal class, UnexpectedValueExceptionStored warnings or preferences that cannot be read back