Parsoid
A bidirectional parser between wikitext and HTML5
Loading...
Searching...
No Matches
Wikimedia\Parsoid\Tokens\SelfclosingTagTk Class Reference

Token for a self-closing tag (HTML or otherwise) More...

+ Inheritance diagram for Wikimedia\Parsoid\Tokens\SelfclosingTagTk:
+ Collaboration diagram for Wikimedia\Parsoid\Tokens\SelfclosingTagTk:

Public Member Functions

 __construct (string $name, array $attribs=[], ?DataParsoid $dataParsoid=null)
 
 getName ()
 Get a name for the token.
 
 jsonSerialize ()
 
- Public Member Functions inherited from Wikimedia\Parsoid\Tokens\Token
 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.
 
 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 (Frame $frame)
 Get the wikitext source of a token.
 
 fetchExpandedAttrValue (string $key)
 

Additional Inherited Members

- Static Public Member Functions inherited from Wikimedia\Parsoid\Tokens\Token
static getToken ( $input)
 Get a token from some PHP structure.
 
- Public Attributes inherited from Wikimedia\Parsoid\Tokens\Token
 $dataParsoid
 
 $attribs
 

Detailed Description

Token for a self-closing tag (HTML or otherwise)

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Parsoid\Tokens\SelfclosingTagTk::__construct ( string $name,
array $attribs = [],
?DataParsoid $dataParsoid = null )
Parameters
string$name
KV[]$attribs
?DataParsoid$dataParsoid

Member Function Documentation

◆ getName()

Wikimedia\Parsoid\Tokens\SelfclosingTagTk::getName ( )

Get a name for the token.

Derived classes can override this.

Returns
string

Reimplemented from Wikimedia\Parsoid\Tokens\Token.

◆ jsonSerialize()

Wikimedia\Parsoid\Tokens\SelfclosingTagTk::jsonSerialize ( )

Reimplemented from Wikimedia\Parsoid\Tokens\Token.


The documentation for this class was generated from the following file: