You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// $triples contains result set, which consists of arrays and scalar values
45
45
```
46
46
47
-
### Example 2 (Consume SPARQL client result)
48
-
49
-
Use `sweetrdf/sparql-client` and a PSR-7-compatible library (like `guzzlehttp/guzzle`) to query a SPARQL endpoint.
50
-
For now you have to "transform" SPARQL result set to a quad-list manually.
51
-
Afterwards add quads to store and query it.
52
-
Check test `testSparqlClientCompatibility` in [InMemoryStoreSqliteTest.php](tests/Integration/Store/InMemoryStoreSqliteTest.php) for a working example.
53
-
54
-
```php
55
-
use GuzzleHttp\Client;
56
-
use GuzzleHttp\Psr7\Request;
57
-
use simpleRdf\Connection;
58
-
use simpleRdf\DataFactory;
59
-
60
-
/*
61
-
* get data from a SPARQL endpoint
62
-
*/
63
-
$httpClient = new Client();
64
-
$dataFactory = new DataFactory();
65
-
$connection = new Connection($httpClient, $dataFactory);
0 commit comments