ParserInterface
in
Tags
Table of Contents
Constants
- BLANK_NODES_PRESERVE = '__PRESERVE_BLANK_NODES__'
- `$baseUri` value to be used when identifiers of blanks nodes encountered in the input source should be preserved. If you need it on production, think twice. It can be a last resort though in some corner cases like parsing reference test outputs.
Methods
Constants
BLANK_NODES_PRESERVE
`$baseUri` value to be used when identifiers of blanks nodes encountered in the input source should be preserved. If you need it on production, think twice. It can be a last resort though in some corner cases like parsing reference test outputs.
public
mixed
BLANK_NODES_PRESERVE
= '__PRESERVE_BLANK_NODES__'
Methods
__construct()
public
__construct(DataFactoryInterface $dataFactory) : mixed
Parameters
- $dataFactory : DataFactoryInterface
-
factory to be used to generate RDF terms.
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
QuadIteratorInterfaceparseStream()
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)