|
Parsoid
A bidirectional parser between wikitext and HTML5
|
Compound token representing lists, tables, etc. More...
Inheritance diagram for Wikimedia\Parsoid\Tokens\CompoundTk:
Collaboration diagram for Wikimedia\Parsoid\Tokens\CompoundTk:Public Member Functions | |
| __construct (array $nestedToks=[], ?DataParsoid $dp=null) | |
| __clone () | |
| addToken ( $token) | |
| addTokens (array $tokens) | |
| getNestedTokens () | |
| setNestedTokens (array $tokens) | |
| setsEOLContext () | |
| Does this token implicitly induce an end-of-line context? This is true for tokens that are only generated on seeing EOL & EOF (ex: IndentPreTk, ListTk) | |
| jsonSerialize () | |
Public Member Functions inherited from Wikimedia\Parsoid\Tokens\Token | |
| toJsonArray () | |
| getType () | |
| Returns a string key for this token. | |
| addAttribute (string $name, $value, ?KVSourceRange $srcOffsets=null) | |
| Generic set attribute method. | |
| addNormalizedAttribute (string $name, $value, $origValue) | |
| Generic set attribute method with support for change detection. | |
| getAttributeV (string $name) | |
| Generic attribute accessor. | |
| getAttributeKV (string $name) | |
| Generic attribute accessor. | |
| hasAttribute (string $name) | |
| Generic attribute accessor. | |
| setAttribute (string $name, $value) | |
| Set an unshadowed attribute. | |
| setShadowInfo (string $name, $value, $origValue) | |
| Store the original value of an attribute in a token's dataParsoid. | |
| setShadowInfoIfModified (string $name, $value, $origValue) | |
| Store the original value of an attribute in a token's dataParsoid. | |
| getAttributeShadowInfo (string $name) | |
| Attribute info accessor for the wikitext serializer. | |
| removeAttribute (string $name) | |
| Completely remove all attributes with this name. | |
| addSpaceSeparatedAttribute (string $name, string $value) | |
| Add a space-separated property value. | |
| getWTSource (Source ... $source) | |
| Get the wikitext source of a token. | |
| fetchExpandedAttrValue (string $key) | |
Protected Attributes | |
| array | $nestedTokens |
Additional Inherited Members | |
Static Public Member Functions inherited from Wikimedia\Parsoid\Tokens\Token | |
| static | jsonClassHintFor (string $keyName) |
| static | newFromJsonArray (array $json) |
| static | hint () |
| static | getToken ( $input) |
| Get a token from some PHP structure. | |
Public Attributes inherited from Wikimedia\Parsoid\Tokens\Token | |
| DataParsoid | $dataParsoid |
| DataMw | $dataMw = null |
| array | $attribs = null |
Protected Member Functions inherited from Wikimedia\Parsoid\Tokens\Token | |
| __construct (?DataParsoid $dataParsoid, ?DataMw $dataMw) | |
Compound token representing lists, tables, etc.
The actual tokens representing the list are stored as a token array in this token.
| Wikimedia\Parsoid\Tokens\CompoundTk::__construct | ( | array | $nestedToks = [], |
| ?DataParsoid | $dp = null ) |
| array<string|Token> | $nestedToks | |
| ?DataParsoid | $dp |
| Wikimedia\Parsoid\Tokens\CompoundTk::__clone | ( | ) |
Reimplemented from Wikimedia\Parsoid\Tokens\Token.
| Wikimedia\Parsoid\Tokens\CompoundTk::addToken | ( | $token | ) |
| string | Token | $token |
| Wikimedia\Parsoid\Tokens\CompoundTk::addTokens | ( | array | $tokens | ) |
| array<string|Token> | $tokens |
| Wikimedia\Parsoid\Tokens\CompoundTk::getNestedTokens | ( | ) |
| Wikimedia\Parsoid\Tokens\CompoundTk::jsonSerialize | ( | ) |
Reimplemented from Wikimedia\Parsoid\Tokens\Token.
Reimplemented in Wikimedia\Parsoid\Tokens\ListTk.
|
abstract |
Does this token implicitly induce an end-of-line context? This is true for tokens that are only generated on seeing EOL & EOF (ex: IndentPreTk, ListTk)
Reimplemented in Wikimedia\Parsoid\Tokens\EmptyLineTk, Wikimedia\Parsoid\Tokens\IndentPreTk, and Wikimedia\Parsoid\Tokens\ListTk.