PHP 클래스 phpbb\textformatter\s9e\utils

상속: implements phpbb\textformatter\utils_interface
파일 보기 프로젝트 열기: phpbb/phpbb 1 사용 예제들

공개 메소드들

메소드 설명
clean_formatting ( string $xml ) : string Replace BBCodes and other formatting elements with whitespace
generate_quote ( $text, array $attributes = [] )
get_outermost_quote_authors ( string $xml ) : string[] Get a list of quote authors, limited to the outermost quotes
remove_bbcode ( string $xml, string $bbcode_name, integer $depth ) : string Remove given BBCode and its content, at given nesting depth
unparse ( string $xml ) : string Return a parsed text to its original form

보호된 메소드들

메소드 설명
enquote ( string $str ) : string Return given string between quotes

메소드 상세

clean_formatting() 공개 메소드

NOTE: preserves smilies as text
public clean_formatting ( string $xml ) : string
$xml string Parsed text
리턴 string Plain text

enquote() 보호된 메소드

Will use either single- or double- quotes depending on whichever requires less escaping. Quotes and backslashes are escaped with backslashes where necessary
protected enquote ( string $str ) : string
$str string Original string
리턴 string Escaped string within quotes

generate_quote() 공개 메소드

public generate_quote ( $text, array $attributes = [] )
$attributes array

get_outermost_quote_authors() 공개 메소드

Get a list of quote authors, limited to the outermost quotes
public get_outermost_quote_authors ( string $xml ) : string[]
$xml string Parsed text
리턴 string[] List of authors

remove_bbcode() 공개 메소드

Remove given BBCode and its content, at given nesting depth
public remove_bbcode ( string $xml, string $bbcode_name, integer $depth ) : string
$xml string Parsed text
$bbcode_name string BBCode's name
$depth integer Minimum nesting depth (number of parents of the same name)
리턴 string Parsed text

unparse() 공개 메소드

Return a parsed text to its original form
public unparse ( string $xml ) : string
$xml string Parsed text
리턴 string Original plain text