[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

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

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 83 lines (2 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

utils_interface:: (6 methods):
  clean_formatting()
  generate_quote()
  get_outermost_quote_authors()
  remove_bbcode()
  unparse()
  is_empty()


Interface: utils_interface  - X-Ref

Used to manipulate a parsed text

In this interface, "plain text" refers to regular text as it would be inputted by a user.
"Parsed text" refers to whichever form is returned by the implementation after parsing, which
should be suitable to be reinserted into the database.
clean_formatting($text)   X-Ref
Replace BBCodes and other formatting elements with whitespace

NOTE: preserves smilies as text

param: string $text Parsed text
return: string       Plain text

generate_quote($text, array $attributes = array()   X-Ref
Create a quote block for given text

Possible attributes:
- author:  author's name (usually a username)
- post_id: post_id of the post being quoted
- user_id: user_id of the user being quoted
- time:    timestamp of the original message

param: string $text       Quote's text
param: array  $attributes Quote's attributes
return: string             Quote block to be used in a new post/text

get_outermost_quote_authors($text)   X-Ref
Get a list of quote authors, limited to the outermost quotes

param: string   $text Parsed text
return: string[]       List of authors

remove_bbcode($text, $bbcode_name, $depth = 0)   X-Ref
Remove given BBCode and its content, 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               Parsed text

unparse($text)   X-Ref
Return a parsed text to its original form

param: string $text Parsed text
return: string       Original plain text

is_empty($text)   X-Ref
Return whether or not a parsed text represent an empty text.

param: string $text Parsed text
return: bool         True if the original text is empty



Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1