PHPackages                             php-task-runner/sparql-robo-tasks - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. php-task-runner/sparql-robo-tasks

AbandonedArchivedRobo-tasks[Utility &amp; Helpers](/categories/utility)

php-task-runner/sparql-robo-tasks
=================================

Provides SPARQL commands for Robo

1.x-dev(1y ago)019.8k1EUPL-1.2PHPPHP &gt;=7.4

Since Jun 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/php-task-runner/sparql-robo-tasks)[ Packagist](https://packagist.org/packages/php-task-runner/sparql-robo-tasks)[ RSS](/packages/php-task-runner-sparql-robo-tasks/feed)WikiDiscussions 1.x Synced today

READMEChangelogDependencies (5)Versions (3)Used By (1)

[![Build Status](https://camo.githubusercontent.com/9ee169649d3f6ec62269445eb49e69718ffe56eb48925ddb6504432146b19914/68747470733a2f2f7472617669732d63692e636f6d2f7068702d7461736b2d72756e6e65722f73706172716c2d726f626f2d7461736b732e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/php-task-runner/sparql-robo-tasks)

This repository provides SPARQL tasks for [Robo](https://github.com/consolidation/Robo/).

Install note
------------

[](#install-note)

Until `easyrdf/easyrdf` package will get stable 1.0.0 release, the root Composer file will have to explicitly require `easyrdf/easyrdf`. See this issue for details: [easyrdf/easyrdf#320](https://github.com/easyrdf/easyrdf/issues/320). After EasyRDF will be stabilised, the library will be moved back to `require` section.

Tasks
-----

[](#tasks)

### Query

[](#query)

```
$query1 = 'SELECT ?s ?p ?o WHERE { ?s ?p ?o } LIMIT 100';
$query2 = '...';

$result = $this->taskSparqlQuery()
    ->setEndpointUrl('http://example.com/sparql')
    ->addQuery($query1)
    ->addQuery($query2)
    ->run();

// Result of $query1.
$res1 = $result->getData()['result'][$query1];
// Result of $query2.
$res2 = $result->getData()['result'][$query2];
```

### Import triples from strings

[](#import-triples-from-strings)

```
$triples1 =
