ParserInterface
in
Tags
Table of Contents
Constants
- BLANK_NODES_PRESERVE : mixed = '__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
- __construct() : mixed
- parse() : QuadIteratorInterface
- parseMessages() : DatasetIteratorInterface
- parseMessagesStream() : DatasetIteratorInterface
- parseStream() : QuadIteratorInterface
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_PRESERVEconstant)
Return values
QuadIteratorInterfaceparseMessages()
public
parseMessages(string $input[, string $baseUri = '' ]) : DatasetIteratorInterface
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_PRESERVEconstant)
Return values
DatasetIteratorInterfaceparseMessagesStream()
public
parseMessagesStream(resource|StreamInterface $input[, string $baseUri = '' ]) : DatasetIteratorInterface
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_PRESERVEconstant)
Return values
DatasetIteratorInterfaceparseStream()
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_PRESERVEconstant)