Documentation

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
author

zozlak

Table of Contents

Interfaces

StatementInterface

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

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

$response

private MessageInterface $response

Methods

execute()

public execute([array<string|int, mixed> $parameters = [] ]) : bool
Parameters
$parameters : array<string|int, mixed> = []
Return values
bool

fetch()

public fetch([int $fetchStyle = PDO::FETCH_OBJ ]) : object|array<string|int, mixed>|string|false
Parameters
$fetchStyle : int = PDO::FETCH_OBJ
Tags
throws
BadMethodCallException
Return values
object|array<string|int, mixed>|string|false

fetchAll()

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|bool

getAcceptHeader()

public static getAcceptHeader() : string
Return values
string

key()

public key() : int|null
Return values
int|null

valid()

public valid() : bool
Return values
bool

getJsonIterator()

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
Iterator

getSepIterator()

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
Generator

getXmlIterator()

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
Generator

        
On this page

Search results