Parsoid
A bidirectional parser between wikitext and HTML5
Loading...
Searching...
No Matches
Wikimedia\Parsoid\NodeData\DataParsoid Class Reference
+ Inheritance diagram for Wikimedia\Parsoid\NodeData\DataParsoid:
+ Collaboration diagram for Wikimedia\Parsoid\NodeData\DataParsoid:

Public Member Functions

 __clone ()
 Deeply clone this object.
 
 isEmpty ()
 
 getTemp ()
 Get a lazy-initialized object to which temporary properties can be written.
 
 getTempFlag ( $flag)
 Check whether a bit is set in $this->tmp->bits.
 
 setTempFlag ( $flag, $value=true)
 Set a bit in $this->tmp->bits.
 
 toJsonArray ()
 
 flatten ()
 Provide a flattened "plain string" form of this data for use as the value of a compatibility attribute to implement HTML semantics.
Returns
?string a plain string, or null to omit the compatibility attribute

 
 embeddedDocumentFragments ()
 Iterate over any DocumentFragments embedded in this attribute.
Returns
\Iterator<DocumentFragment>

 

Static Public Member Functions

static hint ()
 
static defaultValue ()
 Provide a constructor for a default value for objects of this type.
Returns
?self

 
static jsonClassHintFor (string $keyname)
 
static newFromJsonArray (array $json)
 

Public Attributes

TempData $tmp
 Holds a number of transient properties in the wt->html pipeline to pass information between stages.
 

Member Function Documentation

◆ defaultValue()

static Wikimedia\Parsoid\NodeData\DataParsoid::defaultValue ( )
static

Provide a constructor for a default value for objects of this type.

Returns
?self

Implements Wikimedia\Parsoid\Utils\RichCodecable.

◆ embeddedDocumentFragments()

Wikimedia\Parsoid\NodeData\DataParsoid::embeddedDocumentFragments ( )

Iterate over any DocumentFragments embedded in this attribute.

Returns
\Iterator<DocumentFragment>

Implements Wikimedia\Parsoid\Utils\RichCodecable.

◆ flatten()

Wikimedia\Parsoid\NodeData\DataParsoid::flatten ( )

Provide a flattened "plain string" form of this data for use as the value of a compatibility attribute to implement HTML semantics.

Returns
?string a plain string, or null to omit the compatibility attribute

Implements Wikimedia\Parsoid\Utils\RichCodecable.

◆ getTemp()

Wikimedia\Parsoid\NodeData\DataParsoid::getTemp ( )

Get a lazy-initialized object to which temporary properties can be written.

Returns
TempData

◆ getTempFlag()

Wikimedia\Parsoid\NodeData\DataParsoid::getTempFlag ( $flag)

Check whether a bit is set in $this->tmp->bits.

Parameters
int$flag
Returns
bool

◆ hint()

static Wikimedia\Parsoid\NodeData\DataParsoid::hint ( )
static
Returns
Hint<DataParsoid>

Implements Wikimedia\Parsoid\Utils\RichCodecable.

◆ setTempFlag()

Wikimedia\Parsoid\NodeData\DataParsoid::setTempFlag ( $flag,
$value = true )

Set a bit in $this->tmp->bits.

Parameters
int$flag
bool$value

Member Data Documentation

◆ $tmp

TempData Wikimedia\Parsoid\NodeData\DataParsoid::$tmp

Holds a number of transient properties in the wt->html pipeline to pass information between stages.

Dropped before serialization.


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