class Parser extends ParserBase

Properties

protected array $config from  ParserBase
protected Parser $parser from  ParserBase
protected array $attributes
protected array $bbcodeConfig
protected string $bbcodeName
protected string $bbcodeSuffix
protected int $pos
protected int $startPos
protected string $text
protected int $textLen
protected string $uppercaseText

Methods

__construct(Parser $parser, array $config)

Constructor

void
setUp()

Plugin's setup

void
parse(string $text, array $matches)

No description

Tag
addBBCodeEndTag()

Add the end tag that matches current BBCode

Tag
addBBCodeSelfClosingTag()

Add the self-closing tag that matches current BBCode

Tag
addBBCodeStartTag()

Add the start tag that matches current BBCode

Tag|null
captureEndTag()

Parse the end tag that matches given BBCode name and suffix starting at current position

string
getTagName()

Get the tag name for current BBCode

void
parseAttributes()

Parse attributes starting at current position

string
parseAttributeValue()

Parse the attribute value starting at current position

void
parseBBCode()

Parse current BBCode

void
parseBBCodeSuffix()

Parse the BBCode suffix starting at current position

string
parseQuotedAttributeValue()

Parse a quoted attribute value that starts at current offset

Details

in ParserBase at line 30
final __construct(Parser $parser, array $config)

Constructor

Parameters

Parser $parser
array $config

in ParserBase at line 43
protected void setUp()

Plugin's setup

Return Value

void

at line 64
void parse(string $text, array $matches)

No description

Parameters

string $text
array $matches

If the config array has a "regexp" key, the corresponding matches are passed as second parameter. Otherwise, an empty array is passed

Return Value

void

at line 96
protected Tag addBBCodeEndTag()

Add the end tag that matches current BBCode

Return Value

Tag

at line 106
protected Tag addBBCodeSelfClosingTag()

Add the self-closing tag that matches current BBCode

Return Value

Tag

at line 119
protected Tag addBBCodeStartTag()

Add the start tag that matches current BBCode

Return Value

Tag

at line 133
protected Tag|null captureEndTag()

Parse the end tag that matches given BBCode name and suffix starting at current position

Return Value

Tag|null

at line 154
protected string getTagName()

Get the tag name for current BBCode

Return Value

string

at line 167
protected void parseAttributes()

Parse attributes starting at current position

Return Value

void

at line 228
protected string parseAttributeValue()

Parse the attribute value starting at current position

Return Value

string

at line 258
protected void parseBBCode()

Parse current BBCode

Return Value

void

at line 343
protected void parseBBCodeSuffix()

Parse the BBCode suffix starting at current position

Used to explicitly pair specific tags together, e.g. [code:123][code]type your code here[/code][/code:123]

Return Value

void

at line 362
protected string parseQuotedAttributeValue()

Parse a quoted attribute value that starts at current offset

Return Value

string