StringInputStream
class StringInputStream implements InputStream
Properties
$errors | Parse errors. |
Methods
Create a new InputStream wrapper.
Returns the current line that the tokenizer is at.
No description
Returns the current column of the current line that the tokenizer is at.
No description
Get the current character.
Advance the pointer.
Rewind to the start of the string.
Is the current pointer location valid.
Get all characters until EOF.
Read to a particular match (or until $max bytes are consumed).
Returns the string so long as $bytes matches.
Unconsume characters.
Look ahead without moving cursor.
No description
Details
at line line 71
__construct($data, $encoding = 'UTF-8', $debug = '')
Create a new InputStream wrapper.
at line line 112
currentLine()
Returns the current line that the tokenizer is at.
at line line 127
getCurrentLine()
at line line 139
int
columnOffset()
Returns the current column of the current line that the tokenizer is at.
Newlines are column 0. The first char after a newline is column 1.
at line line 170
getColumnOffset()
at line line 180
string
current()
Get the current character.
at line line 189
next()
Advance the pointer.
This is part of the Iterator interface.
at line line 197
rewind()
Rewind to the start of the string.
at line line 207
bool
valid()
Is the current pointer location valid.
at line line 227
remainingChars()
Get all characters until EOF.
This reads to the end of the file, and sets the read marker at the end of the file.
at line line 254
mixed
charsUntil(
string $bytes,
int $max = null)
Read to a particular match (or until $max bytes are consumed).
This operates on byte sequences, not characters.
Matches as far as possible until we reach a certain set of bytes and returns the matched substring.
at line line 285
charsWhile(
string $bytes,
int $max = null)
Returns the string so long as $bytes matches.
Matches as far as possible with a certain set of bytes and returns the matched substring.
at line line 308
unconsume(
int $howMany = 1)
Unconsume characters.
at line line 318
peek()
Look ahead without moving cursor.