phpBB API Documentation
Interface

phpbb\textformatter\parser_interface

interface parser_interface

Methods

string parse(string $text)

Parse given text

null disable_bbcode(string $name)

Disable a specific BBCode

disable_bbcodes()

Disable BBCodes in general

disable_censor()

Disable the censor

disable_magic_url()

Disable magic URLs

disable_smilies()

Disable smilies

null enable_bbcode(string $name)

Enable a specific BBCode

enable_bbcodes()

Enable BBCodes in general

enable_censor()

Enable the censor

enable_magic_url()

Enable magic URLs

enable_smilies()

Enable smilies

array[] get_errors()

Get the list of errors that were generated during last parsing

null set_var(string $name, mixed $value)

Set a variable to be used by the parser

null set_vars(array $vars)

Set multiple variables to be used by the parser

Details

at line 24
public string parse(string $text)

Parse given text

Parameters

string $text

Return Value

string

at line 32
public null disable_bbcode(string $name)

Disable a specific BBCode

Parameters

string $name BBCode name

Return Value

null

at line 37
public disable_bbcodes()

Disable BBCodes in general

at line 42
public disable_censor()

Disable the censor

at line 47
public disable_magic_url()

Disable magic URLs

at line 52
public disable_smilies()

Disable smilies

at line 60
public null enable_bbcode(string $name)

Enable a specific BBCode

Parameters

string $name BBCode name

Return Value

null

at line 65
public enable_bbcodes()

Enable BBCodes in general

at line 70
public enable_censor()

Enable the censor

at line 75
public enable_magic_url()

Enable magic URLs

at line 80
public enable_smilies()

Enable smilies

at line 88
public array[] get_errors()

Get the list of errors that were generated during last parsing

Return Value

array[] Array of arrays. Each array contains a lang string at index 0 plus any number of optional parameters

at line 103
public null set_var(string $name, mixed $value)

Set a variable to be used by the parser

Parameters

string $name
mixed $value

Return Value

null

at line 111
public null set_vars(array $vars)

Set multiple variables to be used by the parser

Parameters

array $vars Associative array of [name => value]

Return Value

null