diff options
author | javiexin <javiexin@gmail.com> | 2017-03-09 16:12:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-09 16:12:25 +0100 |
commit | bd12504f6cf03b36821a5cea2bf77a419496dcdb (patch) | |
tree | d30cc3506e1bbdc284dc7cca910c5dac6b927ae0 /phpBB/phpbb/textformatter/parser_interface.php | |
parent | 96a90d3f81c1fcce3834ee72b7d1b9f76aa9354c (diff) | |
parent | 3e9f12d12d7dbdd2cee39425e81b5fdf66fcfbc8 (diff) | |
download | forums-bd12504f6cf03b36821a5cea2bf77a419496dcdb.tar forums-bd12504f6cf03b36821a5cea2bf77a419496dcdb.tar.gz forums-bd12504f6cf03b36821a5cea2bf77a419496dcdb.tar.bz2 forums-bd12504f6cf03b36821a5cea2bf77a419496dcdb.tar.xz forums-bd12504f6cf03b36821a5cea2bf77a419496dcdb.zip |
Merge branch '3.2.x' into ticket/15068
Diffstat (limited to 'phpBB/phpbb/textformatter/parser_interface.php')
-rw-r--r-- | phpBB/phpbb/textformatter/parser_interface.php | 112 |
1 files changed, 112 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..ad611fb5b4 --- /dev/null +++ b/phpBB/phpbb/textformatter/parser_interface.php @@ -0,0 +1,112 @@ +<?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[] Array of arrays. Each array contains a lang string at index 0 plus any number + * of optional parameters + */ + 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); +} |