private static function XBBCodeTagMatch::parseAttrs in Extensible BBCode 8.2
Parse a string of attribute assignments.
Parameters
$string: The string containing the arguments, including initial whitespace.
Return value
An associative array of all attributes.
1 call to XBBCodeTagMatch::parseAttrs()
File
- src/
XBBCodeTagMatch.php, line 51
Class
Namespace
Drupal\xbbcodeCode
private static function parseAttrs($string) {
preg_match_all('/' . XBBCODE_RE_ATTR . '/', $string, $assignments, PREG_SET_ORDER);
$attrs = [];
foreach ($assignments as $assignment) {
$attrs[$assignment['key']] = $assignment['value'];
}
return $attrs;
}