Statement
in package
implements
StatementInterface
For results data reference see https://www.w3.org/TR/sparql11-results-json/ and https://w3c.github.io/rdf-star/cg-spec/editors_draft.html#sparql-star-query-results-json-format
Tags
Table of Contents
Interfaces
Constants
- JSON_LAN = 'xml:lang'
- XML_CHUNK_SIZE = 1048576
- XML_LANG = 'http://www.w3.org/XML/1998/namespacelang'
- XML_NMSP = 'http://www.w3.org/2005/sparql-results#'
Properties
- $currentRow : object|null
- $dataFactory : DataFactoryInterface
- $iterator : Iterator
- $response : MessageInterface
- $rowNumber : int|null
Methods
- __construct() : mixed
- bindParam() : bool
- bindValue() : bool
- current() : mixed
- execute() : bool
- fetch() : object|array<string|int, mixed>|string|false
- fetchAll() : array<string|int, mixed>
- fetchColumn() : object|bool
- Returns a first column of the next results row.
- getAcceptHeader() : string
- key() : int|null
- next() : void
- rewind() : void
- valid() : bool
- getJsonIterator() : Iterator
- Parses a JSON SPARQL response into rows.
- getSepIterator() : Generator
- Parses a CSV/TSV SPARQL response into rows.
- getXmlIterator() : Generator
- Parses an XML SPARQL response into rows.
- makeTerm() : TermInterface
Constants
JSON_LAN
public
mixed
JSON_LAN
= 'xml:lang'
XML_CHUNK_SIZE
public
mixed
XML_CHUNK_SIZE
= 1048576
XML_LANG
public
mixed
XML_LANG
= 'http://www.w3.org/XML/1998/namespacelang'
XML_NMSP
public
mixed
XML_NMSP
= 'http://www.w3.org/2005/sparql-results#'
Properties
$currentRow
private
object|null
$currentRow
= null
$dataFactory
private
DataFactoryInterface
$dataFactory
$iterator
private
Iterator
$iterator
$response
private
MessageInterface
$response
$rowNumber
private
int|null
$rowNumber
Methods
__construct()
public
__construct(MessageInterface $response, DataFactoryInterface $dataFactory) : mixed
Parameters
- $response : MessageInterface
- $dataFactory : DataFactoryInterface
bindParam()
public
bindParam(int|string $parameter, TermInterface &$variable) : bool
Parameters
- $parameter : int|string
- $variable : TermInterface
Return values
boolbindValue()
public
bindValue(int|string $parameter, TermInterface $value) : bool
Parameters
- $parameter : int|string
- $value : TermInterface
Return values
boolcurrent()
public
current() : mixed
execute()
public
execute([array<string|int, mixed> $parameters = [] ]) : bool
Parameters
- $parameters : array<string|int, mixed> = []
Return values
boolfetch()
public
fetch([int $fetchStyle = PDO::FETCH_OBJ ]) : object|array<string|int, mixed>|string|false
Parameters
- $fetchStyle : int = PDO::FETCH_OBJ
Tags
Return values
object|array<string|int, mixed>|string|falsefetchAll()
public
fetchAll([int $fetchStyle = PDO::FETCH_OBJ ]) : array<string|int, mixed>
Parameters
- $fetchStyle : int = PDO::FETCH_OBJ
Return values
array<string|int, mixed>fetchColumn()
Returns a first column of the next results row.
public
fetchColumn() : object|bool
If there are no more results returns `false.
Please note false
can be also a valid value of the ASK query.
Return values
object|boolgetAcceptHeader()
public
static getAcceptHeader() : string
Return values
stringkey()
public
key() : int|null
Return values
int|nullnext()
public
next() : void
rewind()
public
rewind() : void
valid()
public
valid() : bool
Return values
boolgetJsonIterator()
Parses a JSON SPARQL response into rows.
private
getJsonIterator(StreamInterface $body) : Iterator
Reference:
- https://www.w3.org/TR/2013/REC-sparql11-results-json-20130321/
- https://w3c.github.io/rdf-star/cg-spec/editors_draft.html#sparql-star-query-results-json-format
Parameters
- $body : StreamInterface
Return values
IteratorgetSepIterator()
Parses a CSV/TSV SPARQL response into rows.
private
getSepIterator(StreamInterface $body, string $separator) : Generator
Reference:
- https://www.w3.org/TR/2013/REC-sparql11-results-csv-tsv-20130321/
Parameters
- $body : StreamInterface
- $separator : string
Return values
GeneratorgetXmlIterator()
Parses an XML SPARQL response into rows.
private
getXmlIterator(StreamInterface $body) : Generator
Reference:
- https://www.w3.org/TR/2013/REC-rdf-sparql-XMLres-20130321/
- https://w3c.github.io/rdf-star/cg-spec/editors_draft.html#sparql-star-query-results-xml-format
Parameters
- $body : StreamInterface
Return values
GeneratormakeTerm()
private
makeTerm(object $var) : TermInterface
Parameters
- $var : object