class Parser extends ParserBase

Properties

protected array $config from  ParserBase
protected Parser $parser from  ParserBase
protected string $shortnameRegexp
protected string $unicodeRegexp

Methods

__construct(Parser $parser, array $config)

Constructor

void
setUp()

Plugin's setup

void
parse(string $text, array $matches)

No description

void
addTag(int $tagPos, int $tagLen, string $hex)

Add an emoji tag for given sequence

string
getHexSequence(string $str)

Get the sequence of Unicode codepoints that corresponds to given emoji

void
parseCustomAliases(string $text)

Parse custom aliases in given text

void
parseShortnames(string $text)

Parse shortnames in given text

void
parseUnicode(string $text)

Parse Unicode emoji in given text

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 27
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 42
protected void addTag(int $tagPos, int $tagLen, string $hex)

Add an emoji tag for given sequence

Parameters

int $tagPos

Position of the tag in the original text

int $tagLen

Length of text consumed by the tag

string $hex

Full-qualified sequence of codepoints in hex

Return Value

void

at line 65
protected string getHexSequence(string $str)

Get the sequence of Unicode codepoints that corresponds to given emoji

Parameters

string $str

UTF-8 emoji

Return Value

string

Codepoint sequence, e.g. "0023-20e3"

at line 96
protected void parseCustomAliases(string $text)

Parse custom aliases in given text

Parameters

string $text

Original text

Return Value

void

at line 130
protected void parseShortnames(string $text)

Parse shortnames in given text

Parameters

string $text

Original text

Return Value

void

at line 160
protected void parseUnicode(string $text)

Parse Unicode emoji in given text

Parameters

string $text

Original text

Return Value

void