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

Public Member Functions

 __construct (array $props, ?string $comment=null)
 
 errorMsg (string $desc, ?string $text=null)
 Return a friendly error message related to this item.
 
 error (string $desc, ?string $text=null)
 Throw an error related to this item.
 

Public Attributes

 $type
 
 $filename
 
 $lineNumStart
 
 $lineNumEnd
 
 $comment
 

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Parsoid\ParserTests\Item::__construct ( array $props,
?string $comment = null )
Parameters
array$propsCommon item properties, including type.
?string$commentOptional comment describing the item

Reimplemented in Wikimedia\Parsoid\ParserTests\Article.

Member Function Documentation

◆ error()

Wikimedia\Parsoid\ParserTests\Item::error ( string $desc,
?string $text = null )

Throw an error related to this item.

Parameters
string$descThe error description.
?string$textOptional additional context.
Exceptions

Error

Returns
never

◆ errorMsg()

Wikimedia\Parsoid\ParserTests\Item::errorMsg ( string $desc,
?string $text = null )

Return a friendly error message related to this item.

Parameters
string$descThe error description.
?string$textOptional additional context.
Returns
string The error message string, including the line number and filename of this item.

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