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

Simple class to track offsets Supports only simple cases (no support for overlapping offsets) More...

Public Member Functions

 append ( $start, $end)
 
 appendNodes (array $nodes)
 Append an array of ParsedNode into the tracker.
 
 overlap ( $start, $end)
 
 getOffsets ()
 
 getMinimalUnconsumedOffset ( $offset=0)
 return this first unconsumed offset in this tracker greater than $offset
 

Detailed Description

Simple class to track offsets Supports only simple cases (no support for overlapping offsets)

Member Function Documentation

◆ append()

CirrusSearch\Parser\QueryStringRegex\OffsetTracker::append ( $start,
$end )
Parameters
int$startstart offset (inclusive)
int$endend offset (exclusive)

◆ appendNodes()

CirrusSearch\Parser\QueryStringRegex\OffsetTracker::appendNodes ( array $nodes)

Append an array of ParsedNode into the tracker.

The array must not contain any overlapping node.

Parameters
\CirrusSearch\Parser\AST\ParsedNode[]$nodes

◆ getMinimalUnconsumedOffset()

CirrusSearch\Parser\QueryStringRegex\OffsetTracker::getMinimalUnconsumedOffset ( $offset = 0)

return this first unconsumed offset in this tracker greater than $offset

Parameters
int$offset
Returns
int

◆ getOffsets()

CirrusSearch\Parser\QueryStringRegex\OffsetTracker::getOffsets ( )
Returns
int[]

◆ overlap()

CirrusSearch\Parser\QueryStringRegex\OffsetTracker::overlap ( $start,
$end )
Parameters
int$start
int$end
Returns
bool

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