MediaWiki REL1_39
MediaWiki\Rest\HeaderParser\HeaderParserBase Class Reference
Inheritance diagram for MediaWiki\Rest\HeaderParser\HeaderParserBase:

Protected Member Functions

 assertEnd ()
 If the position is not at the end of the input string, raise an error, complaining of trailing characters.
 
 consumeFixedDigits ( $numDigits)
 Consume a specified number of digits, or throw an exception.
 
 consumeString ( $s)
 Consume a specified string, or throw an exception.
 
 error ( $message)
 Throw an exception to indicate a parse error.
 
 setInput ( $input)
 Set the input, and derived convenience properties.
 
 skipWhitespace ()
 Skip whitespace at the input position (OWS)
 

Protected Attributes

string $input
 The input string being processed.
 
int $inputLength
 The length of $input.
 
int $pos
 The position within $input.
 

Detailed Description

Access: internal

Definition at line 8 of file HeaderParserBase.php.

Member Function Documentation

◆ assertEnd()

MediaWiki\Rest\HeaderParser\HeaderParserBase::assertEnd ( )
protected

If the position is not at the end of the input string, raise an error, complaining of trailing characters.

Exceptions
HeaderParserError

Definition at line 92 of file HeaderParserBase.php.

References MediaWiki\Rest\HeaderParser\HeaderParserBase\error().

Referenced by MediaWiki\Rest\HeaderParser\IfNoneMatch\parseETag().

◆ consumeFixedDigits()

MediaWiki\Rest\HeaderParser\HeaderParserBase::consumeFixedDigits ( $numDigits)
protected

Consume a specified number of digits, or throw an exception.

Parameters
int$numDigits
Returns
string
Exceptions
HeaderParserError

Definition at line 77 of file HeaderParserBase.php.

References MediaWiki\Rest\HeaderParser\HeaderParserBase\error().

◆ consumeString()

MediaWiki\Rest\HeaderParser\HeaderParserBase::consumeString ( $s)
protected

Consume a specified string, or throw an exception.

Parameters
string$s
Exceptions
HeaderParserError

Definition at line 41 of file HeaderParserBase.php.

References $s, and MediaWiki\Rest\HeaderParser\HeaderParserBase\error().

◆ error()

MediaWiki\Rest\HeaderParser\HeaderParserBase::error ( $message)
protected

Throw an exception to indicate a parse error.

Parameters
string$message
Exceptions
HeaderParserError
Returns
never

Definition at line 66 of file HeaderParserBase.php.

Referenced by MediaWiki\Rest\HeaderParser\HeaderParserBase\assertEnd(), MediaWiki\Rest\HeaderParser\HeaderParserBase\consumeFixedDigits(), and MediaWiki\Rest\HeaderParser\HeaderParserBase\consumeString().

◆ setInput()

MediaWiki\Rest\HeaderParser\HeaderParserBase::setInput ( $input)
protected

Set the input, and derived convenience properties.

Parameters
string$input

Definition at line 29 of file HeaderParserBase.php.

References MediaWiki\Rest\HeaderParser\HeaderParserBase\$input.

Referenced by MediaWiki\Rest\HeaderParser\IfNoneMatch\parseETag().

◆ skipWhitespace()

MediaWiki\Rest\HeaderParser\HeaderParserBase::skipWhitespace ( )
protected

Skip whitespace at the input position (OWS)

Definition at line 55 of file HeaderParserBase.php.

Member Data Documentation

◆ $input

string MediaWiki\Rest\HeaderParser\HeaderParserBase::$input
protected

The input string being processed.

Definition at line 12 of file HeaderParserBase.php.

Referenced by MediaWiki\Rest\HeaderParser\HeaderParserBase\setInput().

◆ $inputLength

int MediaWiki\Rest\HeaderParser\HeaderParserBase::$inputLength
protected

The length of $input.

Definition at line 22 of file HeaderParserBase.php.

◆ $pos

int MediaWiki\Rest\HeaderParser\HeaderParserBase::$pos
protected

The position within $input.

Definition at line 17 of file HeaderParserBase.php.


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