CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Parser\AST\ParseWarning Class Reference

A warning that occurred during the parse process. More...

Public Member Functions

 __construct ( $message, $start, array $expectedTokens=[], $actualToken=null, array $messageParams=[])
 
 getMessage ()
 message code
 
 getExpectedTokens ()
 Token types that were expected The type names are parser dependent but should provide meaningful hints to the user.
 
 getActualToken ()
 Token found.
 
 getStart ()
 Offset of the error.
 
 getMessageParams ()
 
 toArray ()
 

Detailed Description

A warning that occurred during the parse process.

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\Parser\AST\ParseWarning::__construct ( $message,
$start,
array $expectedTokens = [],
$actualToken = null,
array $messageParams = [] )
Parameters
string$message
int$start
string[]$expectedTokens
string | null$actualToken
mixed[]$messageParams

Member Function Documentation

◆ getActualToken()

CirrusSearch\Parser\AST\ParseWarning::getActualToken ( )

Token found.

Returns
string

◆ getExpectedTokens()

CirrusSearch\Parser\AST\ParseWarning::getExpectedTokens ( )

Token types that were expected The type names are parser dependent but should provide meaningful hints to the user.

Returns
string[]

◆ getMessage()

CirrusSearch\Parser\AST\ParseWarning::getMessage ( )

message code

Returns
string

◆ getMessageParams()

CirrusSearch\Parser\AST\ParseWarning::getMessageParams ( )
Returns
mixed[]

◆ getStart()

CirrusSearch\Parser\AST\ParseWarning::getStart ( )

Offset of the error.

NOTE: Offset in byte (mb_strcut if you want to provide feedback and print the error in context)

Returns
int

◆ toArray()

CirrusSearch\Parser\AST\ParseWarning::toArray ( )
Returns
array

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