TriGParser
in package
implements
ParserInterface, QuadIteratorInterface
uses
TmpStreamParserTrait, StreamSkipBomTrait
Description of Parser
Tags
Table of Contents
Interfaces
Constants
- CHUNK_SIZE = 8192
Properties
- $bomUtf8 : mixed
- $chunk : string
- $dataFactory : DataFactoryInterface
- $input : StreamInterface
- $invalidBoms2B : mixed
- $invalidBoms3B : mixed
- $invalidBoms4B : mixed
- $n : int
- $options : array<string|int, mixed>
- $parser : TriGParser
- $prefixCallback : callable|null
- $quadsBuffer : ArrayIterator<int, QuadInterface>
- $tmpStream : resource|null
Methods
- __construct() : mixed
- __destruct() : mixed
- current() : QuadInterface
- key() : mixed
- next() : void
- parse() : QuadIteratorInterface
- parseStream() : QuadIteratorInterface
- rewind() : void
- valid() : bool
- closeTmpStream() : void
- skipBom() : void
Constants
CHUNK_SIZE
public
mixed
CHUNK_SIZE
= 8192
Properties
$bomUtf8
private
mixed
$bomUtf8
= ""
$chunk
private
string
$chunk
$dataFactory
private
DataFactoryInterface
$dataFactory
$input
private
StreamInterface
$input
$invalidBoms2B
private
mixed
$invalidBoms2B
= ["\xef\xff" => "UTF-16 BE", "\xff\xfe" => "UTF-16 LE"]
$invalidBoms3B
private
mixed
$invalidBoms3B
= ["+/v" => "UTF-7", "\xf7dL" => "UTF-1", "\x0e\xfe\xff" => "SCSU", "\xfb\xee(" => "BOCU-1"]
$invalidBoms4B
private
mixed
$invalidBoms4B
= ["\x00\x00\xfe\xff" => "UTF-32 BE", "\xff\xfe\x00\x00" => "UTF-32 LE", "\xddsfs" => "UTF-EBCDIC", "\x841\x953" => "GB18030"]
$n
private
int
$n
$options
private
array<string|int, mixed>
$options
$parser
private
TriGParser
$parser
$prefixCallback
private
callable|null
$prefixCallback
$quadsBuffer
private
ArrayIterator<int, QuadInterface>
$quadsBuffer
$tmpStream
private
resource|null
$tmpStream
Methods
__construct()
public
__construct(DataFactoryInterface $dataFactory[, array<string|int, mixed> $options = [] ][, callable|null $prefixCallback = null ]) : mixed
Parameters
- $dataFactory : DataFactoryInterface
-
factory to be used to generate RDF terms.
- $options : array<string|int, mixed> = []
-
options to be passed to the pietercolpaert\hardf\TriGParser constructor
- $prefixCallback : callable|null = null
-
a callable for handling prefixes to be passed to the pietercolpaert\hardf\TriGParser constructor
Tags
__destruct()
public
__destruct() : mixed
current()
public
current() : QuadInterface
Return values
QuadInterfacekey()
public
key() : mixed
next()
public
next() : void
parse()
public
parse(string $input) : QuadIteratorInterface
Parameters
- $input : string
Return values
QuadIteratorInterfaceparseStream()
public
parseStream(resource|StreamInterface $input) : QuadIteratorInterface
Parameters
- $input : resource|StreamInterface
Return values
QuadIteratorInterfacerewind()
public
rewind() : void
valid()
public
valid() : bool
Return values
boolcloseTmpStream()
private
closeTmpStream() : void
skipBom()
private
skipBom(StreamInterface $stream) : void
Parameters
- $stream : StreamInterface