Parsoid
A bidirectional parser between wikitext and HTML5
Loading...
Searching...
No Matches
Wikimedia\Parsoid\Wt2Html\PP\Processors\AnnotationDOMRangeBuilder Class Reference
+ Inheritance diagram for Wikimedia\Parsoid\Wt2Html\PP\Processors\AnnotationDOMRangeBuilder:
+ Collaboration diagram for Wikimedia\Parsoid\Wt2Html\PP\Processors\AnnotationDOMRangeBuilder:

Public Member Functions

 __construct (Document $document, Frame $frame)
 AnnotationDOMRangeBuilder constructor.
 
 execute (Node $root)
 
- Public Member Functions inherited from Wikimedia\Parsoid\Wt2Html\PP\Processors\DOMRangeBuilder
 findTopLevelNonOverlappingRanges (Node $docRoot, array $tplRanges)
 Identify the elements of $tplRanges that are non-overlapping.
 

Protected Member Functions

 matchMetaType (Element $elem)
 Returns the meta type of the element if it exists and matches the type expected by the current class, null otherwise.
 
 verifyTplInfoExpectation (?TemplateInfo $templateInfo, TempData $tmp)
 
Parameters
?TemplateInfo$templateInfo
TempData$tmp

 
 getRangeId (Element $node)
 Returns the range ID of a node - in the case of annotations, the "rangeId" property of its "data-mw" attribute.
 
 updateDSRForFirstRangeNode (Element $target, Element $source)
 
Parameters
Element$target
Element$source

 
- Protected Member Functions inherited from Wikimedia\Parsoid\Wt2Html\PP\Processors\DOMRangeBuilder
 getStartConsideringFosteredContent (Node $node)
 Returns the current node if it's not just after fostered content, the first node of fostered content otherwise.
 
 findWrappableMetaRanges (Node $rootNode)
 Recursively walk the DOM tree.
 

Additional Inherited Members

- Protected Attributes inherited from Wikimedia\Parsoid\Wt2Html\PP\Processors\DOMRangeBuilder
 $env
 
 $nodeRanges
 
 $traceType
 

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Parsoid\Wt2Html\PP\Processors\AnnotationDOMRangeBuilder::__construct ( Document $document,
Frame $frame )

AnnotationDOMRangeBuilder constructor.

Parameters
Document$document
Frame$frame

Reimplemented from Wikimedia\Parsoid\Wt2Html\PP\Processors\DOMRangeBuilder.

Member Function Documentation

◆ execute()

Wikimedia\Parsoid\Wt2Html\PP\Processors\AnnotationDOMRangeBuilder::execute ( Node $root)
Parameters
Node$root

Reimplemented from Wikimedia\Parsoid\Wt2Html\PP\Processors\DOMRangeBuilder.

◆ getRangeId()

Wikimedia\Parsoid\Wt2Html\PP\Processors\AnnotationDOMRangeBuilder::getRangeId ( Element $node)
protected

Returns the range ID of a node - in the case of annotations, the "rangeId" property of its "data-mw" attribute.

Parameters
Element$node
Returns
string

Reimplemented from Wikimedia\Parsoid\Wt2Html\PP\Processors\DOMRangeBuilder.

◆ matchMetaType()

Wikimedia\Parsoid\Wt2Html\PP\Processors\AnnotationDOMRangeBuilder::matchMetaType ( Element $elem)
protected

Returns the meta type of the element if it exists and matches the type expected by the current class, null otherwise.

Parameters
Element$elemthe element to check
Returns
string|null

Reimplemented from Wikimedia\Parsoid\Wt2Html\PP\Processors\DOMRangeBuilder.

◆ updateDSRForFirstRangeNode()

Wikimedia\Parsoid\Wt2Html\PP\Processors\AnnotationDOMRangeBuilder::updateDSRForFirstRangeNode ( Element $target,
Element $source )
protected

Parameters
Element$target
Element$source

Reimplemented from Wikimedia\Parsoid\Wt2Html\PP\Processors\DOMRangeBuilder.

◆ verifyTplInfoExpectation()

Wikimedia\Parsoid\Wt2Html\PP\Processors\AnnotationDOMRangeBuilder::verifyTplInfoExpectation ( ?TemplateInfo $templateInfo,
TempData $tmp )
protected

Parameters
?TemplateInfo$templateInfo
TempData$tmp

Reimplemented from Wikimedia\Parsoid\Wt2Html\PP\Processors\DOMRangeBuilder.


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