diff options
author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-04-05 23:32:38 +0200 |
---|---|---|
committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-04-05 23:32:38 +0200 |
commit | 3a6a61a8dd6a2c8e14b42450496287f87c3c5975 (patch) | |
tree | ed41376b47d199f3a5ea44ed8d26e6015c693271 /phpBB/phpbb/textformatter/parser_interface.php | |
parent | 5ac13c7ddc19a574878959fe6906d5d6cf30da51 (diff) | |
parent | 4e80565fe7862da4ea1948c6ece1099a59a1020f (diff) | |
download | forums-3a6a61a8dd6a2c8e14b42450496287f87c3c5975.tar forums-3a6a61a8dd6a2c8e14b42450496287f87c3c5975.tar.gz forums-3a6a61a8dd6a2c8e14b42450496287f87c3c5975.tar.bz2 forums-3a6a61a8dd6a2c8e14b42450496287f87c3c5975.tar.xz forums-3a6a61a8dd6a2c8e14b42450496287f87c3c5975.zip |
Merge pull request #3461 from s9e/ticket/11768
[3.2][ticket/11768] Integrate s9e\TextFormatter
Diffstat (limited to 'phpBB/phpbb/textformatter/parser_interface.php')
-rw-r--r-- | phpBB/phpbb/textformatter/parser_interface.php | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/phpBB/phpbb/textformatter/parser_interface.php b/phpBB/phpbb/textformatter/parser_interface.php new file mode 100644 index 0000000000..3cb9f8e977 --- /dev/null +++ b/phpBB/phpbb/textformatter/parser_interface.php @@ -0,0 +1,111 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\textformatter; + +interface parser_interface +{ + /** + * Parse given text + * + * @param string $text + * @return string + */ + public function parse($text); + + /** + * Disable a specific BBCode + * + * @param string $name BBCode name + * @return null + */ + public function disable_bbcode($name); + + /** + * Disable BBCodes in general + */ + public function disable_bbcodes(); + + /** + * Disable the censor + */ + public function disable_censor(); + + /** + * Disable magic URLs + */ + public function disable_magic_url(); + + /** + * Disable smilies + */ + public function disable_smilies(); + + /** + * Enable a specific BBCode + * + * @param string $name BBCode name + * @return null + */ + public function enable_bbcode($name); + + /** + * Enable BBCodes in general + */ + public function enable_bbcodes(); + + /** + * Enable the censor + */ + public function enable_censor(); + + /** + * Enable magic URLs + */ + public function enable_magic_url(); + + /** + * Enable smilies + */ + public function enable_smilies(); + + /** + * Get the list of errors that were generated during last parsing + * + * @return array + */ + public function get_errors(); + + /** + * Set a variable to be used by the parser + * + * - max_font_size + * - max_img_height + * - max_img_width + * - max_smilies + * - max_urls + * + * @param string $name + * @param mixed $value + * @return null + */ + public function set_var($name, $value); + + /** + * Set multiple variables to be used by the parser + * + * @param array $vars Associative array of [name => value] + * @return null + */ + public function set_vars(array $vars); +} |