Documentation

JsonLdParser
in package
implements ParserInterface, QuadIteratorInterface uses CreateBlankNodeTrait

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
author

zozlak

Table of Contents

Interfaces

ParserInterface
QuadIteratorInterface

Properties

$baseUri  : string
$blankMap  : mixed
$curQuad  : QuadInterface|null
$dataFactory  : DataFactoryInterface
$quads  : array<int, Quad>

Methods

__construct()  : mixed
createBlankNode()  : BlankNodeInterface
current()  : QuadInterface|null
key()  : int|null
next()  : void
parse()  : QuadIteratorInterface
parseStream()  : QuadIteratorInterface
rewind()  : void
setBaseUri()  : void
valid()  : bool

Properties

Methods

parse()

public parse(string $input[, string $baseUri = '' ]) : QuadIteratorInterface
Parameters
$input : string
$baseUri : string = ''

allows to specify the base URI of the parsed document so a parser can correctly determine which blank nodes belong to the same document (see also the BLANK_NODES_PRESERVE constant)

Return values
QuadIteratorInterface

parseStream()

public parseStream(resource|StreamInterface $input[, string $baseUri = '' ]) : QuadIteratorInterface
Parameters
$input : resource|StreamInterface
$baseUri : string = ''

allows to specify the base URI of the parsed document so a parser can correctly determine which blank nodes belong to the same document (see also the BLANK_NODES_PRESERVE constant)

Return values
QuadIteratorInterface

setBaseUri()

public setBaseUri(string|null $baseUri) : void
Parameters
$baseUri : string|null

        
On this page

Search results