diff options
author | Laria Carolin Chabowski <laria@laria.me> | 2020-09-25 21:18:18 +0200 |
---|---|---|
committer | Laria Carolin Chabowski <laria@laria.me> | 2020-09-25 21:28:55 +0200 |
commit | 378881378aab5454c84cb1fecbbcc675f64dc27f (patch) | |
tree | f8bbe239c2a87cc61bec05b987099e4401dd2693 /ratatoeskr/sys/textprocessors/Textprocessor.php | |
parent | 78c0350b3b7fc025ba565e19bfa195b68e95bb88 (diff) | |
download | ratatoeskr-cms-378881378aab5454c84cb1fecbbcc675f64dc27f.tar.gz ratatoeskr-cms-378881378aab5454c84cb1fecbbcc675f64dc27f.tar.bz2 ratatoeskr-cms-378881378aab5454c84cb1fecbbcc675f64dc27f.zip |
Refactor textprocessors
They are now managed by TextprocessorRepository and are instances of
Textprocessor. This replaces the global $textprocessors variable.
Diffstat (limited to 'ratatoeskr/sys/textprocessors/Textprocessor.php')
-rw-r--r-- | ratatoeskr/sys/textprocessors/Textprocessor.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ratatoeskr/sys/textprocessors/Textprocessor.php b/ratatoeskr/sys/textprocessors/Textprocessor.php new file mode 100644 index 0000000..90c1347 --- /dev/null +++ b/ratatoeskr/sys/textprocessors/Textprocessor.php @@ -0,0 +1,19 @@ +<?php + +namespace r7r\cms\sys\textprocessors; + +/** + * Interface Textprocessor. + * + * A textprocessor turns an input into HTML. + */ +interface Textprocessor +{ + public function apply(string $input): string; + + /** + * Should this textprocessor be available to the user in the backend? + * @return bool + */ + public function showInBackend(): bool; +} |