[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

/phpbb/textformatter/ -> utils_interface.php (source)

   1  <?php
   2  /**
   3  *
   4  * This file is part of the phpBB Forum Software package.
   5  *
   6  * @copyright (c) phpBB Limited <https://www.phpbb.com>
   7  * @license GNU General Public License, version 2 (GPL-2.0)
   8  *
   9  * For full copyright and license information, please see
  10  * the docs/CREDITS.txt file.
  11  *
  12  */
  13  
  14  namespace phpbb\textformatter;
  15  
  16  /**
  17  * Used to manipulate a parsed text
  18  */
  19  interface utils_interface
  20  {
  21      /**
  22      * Replace BBCodes and other formatting elements with whitespace
  23      *
  24      * NOTE: preserves smilies as text
  25      *
  26      * @param  string $text Parsed text
  27      * @return string       Plain text
  28      */
  29  	public function clean_formatting($text);
  30  
  31      /**
  32      * Create a quote block for given text
  33      *
  34      * Possible attributes:
  35      *   - author:  author's name (usually a username)
  36      *   - post_id: post_id of the post being quoted
  37      *   - user_id: user_id of the user being quoted
  38      *   - time:    timestamp of the original message
  39      *
  40      * @param  string $text       Quote's text
  41      * @param  array  $attributes Quote's attributes
  42      * @return string             Quote block to be used in a new post/text
  43      */
  44  	public function generate_quote($text, array $attributes = array());
  45  
  46      /**
  47      * Get a list of quote authors, limited to the outermost quotes
  48      *
  49      * @param  string   $text Parsed text
  50      * @return string[]       List of authors
  51      */
  52  	public function get_outermost_quote_authors($text);
  53  
  54      /**
  55      * Remove given BBCode and its content, at given nesting depth
  56      *
  57      * @param  string  $text        Parsed text
  58      * @param  string  $bbcode_name BBCode's name
  59      * @param  integer $depth       Minimum nesting depth (number of parents of the same name)
  60      * @return string               Parsed text
  61      */
  62  	public function remove_bbcode($text, $bbcode_name, $depth = 0);
  63  
  64      /**
  65       * Return a parsed text to its original form
  66       *
  67       * @param  string $text Parsed text
  68       * @return string       Original plain text
  69       */
  70  	public function unparse($text);
  71  
  72      /**
  73       * Return whether or not a parsed text represent an empty text.
  74       *
  75       * @param  string $text Parsed text
  76       * @return bool         Tue if the original text is empty
  77       */
  78  	public function is_empty($text);
  79  }


Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1