From 20a1646fc6336635cee89426e3a60bb22cb138de Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Fri, 6 Mar 2015 10:50:05 +0100 Subject: [ticket/11768] Renamed utils PHPBB3-11768 --- phpBB/phpbb/textformatter/s9e/utils.php | 2 +- phpBB/phpbb/textformatter/utils.php | 58 --------------------------- phpBB/phpbb/textformatter/utils_interface.php | 58 +++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 59 deletions(-) delete mode 100644 phpBB/phpbb/textformatter/utils.php create mode 100644 phpBB/phpbb/textformatter/utils_interface.php (limited to 'phpBB/phpbb') diff --git a/phpBB/phpbb/textformatter/s9e/utils.php b/phpBB/phpbb/textformatter/s9e/utils.php index 57e836d2d4..df4ae4b9ec 100644 --- a/phpBB/phpbb/textformatter/s9e/utils.php +++ b/phpBB/phpbb/textformatter/s9e/utils.php @@ -16,7 +16,7 @@ namespace phpbb\textformatter\s9e; /** * Text manipulation utilities */ -class utils extends \phpbb\textformatter\utils +class utils implements \phpbb\textformatter\utils_interface { /** * {@inheritdoc} diff --git a/phpBB/phpbb/textformatter/utils.php b/phpBB/phpbb/textformatter/utils.php deleted file mode 100644 index 13942b9248..0000000000 --- a/phpBB/phpbb/textformatter/utils.php +++ /dev/null @@ -1,58 +0,0 @@ - -* @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; - -/** -* Used to manipulate a parsed text -*/ -abstract class utils -{ - /** - * Replace BBCodes and other formatting elements with whitespace - * - * NOTE: preserves smilies as text - * - * @param string $text - * @return string - */ - abstract public function clean_formatting($text); - - /** - * Remove given BBCode at given nesting depth - * - * @param string $text Parsed text - * @param string $bbcode_name BBCode's name - * @param integer $depth Minimum nesting depth (number of parents of the same name) - * @return string - */ - abstract public function remove_bbcode($text, $bbcode_name, $depth = 0); - - /** - * Remove BBCodes and other formatting from a parsed text - * - * NOTE: preserves smilies as text - * - * @param string $text - * @return string - */ - abstract public function remove_formatting($text); - - /** - * Return a parsed text to its original form - * - * @param string $text - * @return string - */ - abstract public function unparse($text); -} diff --git a/phpBB/phpbb/textformatter/utils_interface.php b/phpBB/phpbb/textformatter/utils_interface.php new file mode 100644 index 0000000000..45610f7ecb --- /dev/null +++ b/phpBB/phpbb/textformatter/utils_interface.php @@ -0,0 +1,58 @@ + +* @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; + +/** +* Used to manipulate a parsed text +*/ +interface utils_interface +{ + /** + * Replace BBCodes and other formatting elements with whitespace + * + * NOTE: preserves smilies as text + * + * @param string $text + * @return string + */ + public function clean_formatting($text); + + /** + * Remove given BBCode at given nesting depth + * + * @param string $text Parsed text + * @param string $bbcode_name BBCode's name + * @param integer $depth Minimum nesting depth (number of parents of the same name) + * @return string + */ + public function remove_bbcode($text, $bbcode_name, $depth = 0); + + /** + * Remove BBCodes and other formatting from a parsed text + * + * NOTE: preserves smilies as text + * + * @param string $text + * @return string + */ + public function remove_formatting($text); + + /** + * Return a parsed text to its original form + * + * @param string $text + * @return string + */ + public function unparse($text); +} -- cgit v1.2.1