Skip to content

byjg/anydataset-sparql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AnyDataset-SparQL

Opensource ByJG GitHub source GitHub license GitHub release Build Status

SparQL abstraction dataset. Anydataset is an agnostic data source abstraction layer in PHP.

See more about Anydataset here.

Examples

Simple Manipulation

<?php

$sparqlEndpoint = 'http://dbpedia.org/sparql';

$namespace = [
    'dbo' => 'http://dbpedia.org/ontology/',
    'dbp' => 'http://dbpedia.org/property/'
];

$dataset = new \ByJG\AnyDataset\Semantic\SparQLDataset($sparqlEndpoint, $namespace);
$iterator = $dataset->getIterator("select distinct ?Concept where {[] a ?Concept} LIMIT 5");

foreach ($iterator as $row) {
    echo $row->get("Concept");
    echo $row->get("Concept.type");
}

Install

Just type:

composer require "byjg/anydataset-sparql=4.0.*"

Running the Unit tests

vendor/bin/phpunit

Open source ByJG

About

Anydataset SparQL abstraction. Anydataset is an agnostic data source abstraction layer in PHP.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages