MediaWiki REL1_39
|
Simple SPARQL client. More...
Public Member Functions | |
__construct ( $url, HttpRequestFactory $requestFactory) | |
appendUserAgent ( $agent) | |
Append specific string to user agent. | |
getUserAgent () | |
Get current user agent. | |
query ( $sparql, $rawData=false) | |
Query SPARQL endpoint. | |
setClientOptions ( $options) | |
setTimeout ( $timeout) | |
Set query timeout (in seconds) | |
setUserAgent ( $agent) | |
Mote it is not recommended to completely override user agent for most applications. | |
Public Attributes | |
const | MAX_GET_SIZE = 2048 |
Limit on how long can be the query to be sent by GET. | |
Simple SPARQL client.
Definition at line 31 of file SparqlClient.php.
MediaWiki\Sparql\SparqlClient::__construct | ( | $url, | |
HttpRequestFactory | $requestFactory ) |
string | $url | SPARQL Endpoint |
HttpRequestFactory | $requestFactory |
Definition at line 71 of file SparqlClient.php.
References MediaWiki\Http\HttpRequestFactory\getUserAgent().
MediaWiki\Sparql\SparqlClient::appendUserAgent | ( | $agent | ) |
Append specific string to user agent.
This is the recommended way of specifying the user agent for specific applications of the SparqlClient inside MediaWiki and extension code.
string | $agent |
Definition at line 126 of file SparqlClient.php.
MediaWiki\Sparql\SparqlClient::getUserAgent | ( | ) |
MediaWiki\Sparql\SparqlClient::query | ( | $sparql, | |
$rawData = false ) |
Query SPARQL endpoint.
string | $sparql | query |
bool | $rawData | Whether to return only values or full data objects |
SparqlException |
Definition at line 140 of file SparqlClient.php.
References wfAppendQuery().
MediaWiki\Sparql\SparqlClient::setClientOptions | ( | $options | ) |
MediaWiki\Sparql\SparqlClient::setTimeout | ( | $timeout | ) |
Set query timeout (in seconds)
int | $timeout |
Definition at line 82 of file SparqlClient.php.
MediaWiki\Sparql\SparqlClient::setUserAgent | ( | $agent | ) |
Mote it is not recommended to completely override user agent for most applications.
string | $agent |
Definition at line 113 of file SparqlClient.php.
const MediaWiki\Sparql\SparqlClient::MAX_GET_SIZE = 2048 |
Limit on how long can be the query to be sent by GET.
Definition at line 36 of file SparqlClient.php.