|
|
| __construct (SourceRange $tsr, string|KV $contents,) |
| |
|
| getMarker () |
| | Return the Parsoid fragment marker, which can be passed to (eg) TokenizerUtils::parsoidFragmentMarkerToTokens()
|
| |
| | __clone () |
| |
| | jsonSerialize () |
| |
| | getContents () |
| |
| | getContentsKV () |
| |
| | setContents (array $contents, SourceRange $tsr) |
| |
| | setContentsKV (KV $contents) |
| |
|
| __toString () |
| | Return the string form of this PreprocTk; this should be identical to the original "preprocessed" wikitext.
|
| |
| | getBarredArgs () |
| | Split this token by | and return target and named args.
|
| |
| | print ( $pretty=true) |
| | Pretty-print a PreprocTk 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) |
| |
|
| static | newFromJsonArray (array $json) |
| |
| static | newContentsKV (array $contents, ?SourceRange $tsr) |
| | Helper: return a new contents KV.
|
| |
|
static | trimContentsKV (KV $contents) |
| | Trim whitespace from both sides of a contents KV.
|
| |
| static | splitContentsBy (string|array|callable $sep, KV $contents, int $limit=-1) |
| | Split a contents KV by a string or a function.
|
| |
| static | printContents ( $contents, bool $pretty=true) |
| | Pretty-print a contents KV on multiple lines.
|
| |
|
static | jsonClassHintFor (string $keyName) |
| |
|
static | hint () |
| |
| static | getToken ( $input) |
| | Get a token from some PHP structure.
|
| |
Represents "PFragment tokens" from the preprocessor.
These are the Parsoid equivalent of core "strip markers", and represent opaque transcluded content.