JsonLdParser
in package
implements
ParserInterface, QuadIteratorInterface
Thin wrapper providing RdfInterface\Parser API for JSON-LD the parser provided by the ml/json-ld library.
Doesn't provide stream parsing because the ml/json-ld library doesn't so be carefull when parsing large inputs.
Tags
Table of Contents
Interfaces
Properties
- $baseUri : string|null
- $curQuad : QuadInterface|null
- $dataFactory : DataFactoryInterface
- $quads : array<int, Quad>
Methods
- __construct() : mixed
- current() : QuadInterface|null
- key() : int|null
- next() : void
- parse() : QuadIteratorInterface
- parseStream() : QuadIteratorInterface
- rewind() : void
- setBaseUri() : void
- valid() : bool
Properties
$baseUri
private
string|null
$baseUri
= null
$curQuad
private
QuadInterface|null
$curQuad
= null
$dataFactory
private
DataFactoryInterface
$dataFactory
$quads
private
array<int, Quad>
$quads
Methods
__construct()
public
__construct(DataFactoryInterface $dataFactory[, string|null $baseUri = null ]) : mixed
Parameters
- $dataFactory : DataFactoryInterface
-
factory to be used to generate RDF terms.
- $baseUri : string|null = null
current()
public
current() : QuadInterface|null
Return values
QuadInterface|nullkey()
public
key() : int|null
Return values
int|nullnext()
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
setBaseUri()
public
setBaseUri(string|null $baseUri) : void
Parameters
- $baseUri : string|null
valid()
public
valid() : bool