[ Index ]

PHP Cross Reference of phpBB-3.3.7-deutsch




/phpbb/textformatter/s9e/ -> utils.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: 155 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

utils:: (7 methods):

Class: utils  - X-Ref

Text manipulation utilities

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

NOTE: preserves smilies as text

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

format_attribute_value($str)   X-Ref
Format given string to be used as an attribute value

Will return the string as-is if it can be used in a BBCode without quotes. Otherwise,
it will use either single- or double- quotes depending on whichever requires less escaping.
Quotes and backslashes are escaped with backslashes where necessary

param: string $str Original string
return: string      Same string if possible, escaped string within quotes otherwise

generate_quote($text, array $attributes = array()   X-Ref

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

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

remove_bbcode($xml, $bbcode_name, $depth = 0)   X-Ref
Remove given BBCode and its content, at given nesting depth

param: string  $xml         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($xml)   X-Ref
Return a parsed text to its original form

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

is_empty($text)   X-Ref

Generated: Thu Mar 24 21:31:15 2022 Cross-referenced by PHPXref 0.7.1