|
MediaWiki master
|
Simple SPARQL client. More...
Public Member Functions | |
| __construct (string $url, HttpRequestFactory $requestFactory) | |
| appendUserAgent (string $agent) | |
| Append specific string to user agent. | |
| getUserAgent () | |
| Get current user agent. | |
| query (string $sparql, bool $rawData=false) | |
| Query SPARQL endpoint. | |
| setClientOptions (array $options) | |
| setTimeout (int $timeout) | |
| Set query timeout (in seconds) | |
| setUserAgent (string $agent) | |
| Note 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 17 of file SparqlClient.php.
| MediaWiki\Sparql\SparqlClient::__construct | ( | string | $url, |
| HttpRequestFactory | $requestFactory ) |
| string | $url | SPARQL Endpoint |
| HttpRequestFactory | $requestFactory |
Definition at line 50 of file SparqlClient.php.
References $url, and MediaWiki\Http\HttpRequestFactory\getUserAgent().
| MediaWiki\Sparql\SparqlClient::appendUserAgent | ( | string | $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.
Definition at line 105 of file SparqlClient.php.
| MediaWiki\Sparql\SparqlClient::getUserAgent | ( | ) |
Get current user agent.
Definition at line 80 of file SparqlClient.php.
| MediaWiki\Sparql\SparqlClient::query | ( | string | $sparql, |
| bool | $rawData = false ) |
Query SPARQL endpoint.
| string | $sparql | query |
| bool | $rawData | Whether to return only values or full data objects |
| SparqlException |
Definition at line 120 of file SparqlClient.php.
| MediaWiki\Sparql\SparqlClient::setClientOptions | ( | array | $options | ) |
| MediaWiki\Sparql\SparqlClient::setTimeout | ( | int | $timeout | ) |
Set query timeout (in seconds)
| int | $timeout |
Definition at line 61 of file SparqlClient.php.
| MediaWiki\Sparql\SparqlClient::setUserAgent | ( | string | $agent | ) |
Note it is not recommended to completely override user agent for most applications.
Definition at line 91 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 22 of file SparqlClient.php.