NQuads
in package
implements
QuadSerializerInterface, QuadParserInterface
NQuads serializes quads to the NQuads format
Tags
Table of Contents
Interfaces
- QuadSerializerInterface
- Quad serializer interface
- QuadParserInterface
- Quad parser interface
Methods
- parse() : array<string|int, Quad>
- Parses quads
- serialize() : string
- Serializes quads to a string.
Methods
parse()
Parses quads
public
parse(mixed $input) : array<string|int, Quad>
This method is heavily based on DigitalBazaar's implementation used in their php-json-ld.
Parameters
- $input : mixed
-
The serialized quads to parse.
Tags
Return values
array<string|int, Quad> —An array of extracted quads.
serialize()
Serializes quads to a string.
public
serialize(array<string|int, mixed> $quads) : string
Parameters
- $quads : array<string|int, mixed>
-
Array of quads to be serialized.
Return values
string —The serialized quads.