easyrdf-bundle, a Symfony bundle for EasyRDF

Submitted by admin on Fri, 03/24/2017 - 09:03

I just published a forked Symfony bundle for EasyRDF

https://github.com/asanchez75/easyrdf-bundle

It is a forked version from conjecto/easyrdf-bundle.
It implements autoload for psr-4 and add a parameter to initialize the Client service.
 
<strong>Usage</strong>
 
1) Add to your composer.json the following lines
 
    "repositories": [
        {
            "type": "vcs",
            "url": "<a href="<a href="https://github.com/asanchez75/easyrdf-bundle.git">https://github.com/asanchez75/easyrdf-bundle.git</a>"&#10">https://github.com/asanchez75/easyrdf-bundle.git">https://github.com/as…</a>;        }
    ],
    "require": {
        "conjecto/easyrdf-bundle": "dev-master as 0.1"
    },
 
2) Launch composer update inside your Symfony Application
 
3) Define a global parameter sparql_endpoint in your file app/config/config.yml
 
parameters:
    sparql_endpoint: <a href="http://localhost:8890/sparql
 
Be">http://localhost:8890/sparql
 
Be</a> aware that the parameter %sparql_endpoint% is used in the file
 
<a href="<a href="https://github.com/asanchez75/easyrdf-bundle/blob/master/Resources/config/services.xml">https://github.com/asanchez75/easyrdf-bundle/blob/master/Resources/config/services.xml</a>
 
4">https://github.com/asanchez75/easyrdf-bundle/blob/master/Resources/conf…</a>) Add the bundle to your file app/AppKernel.php
 
new Conjecto\Bundle\EasyRdfBundle\EasyRdfBundle();
 
5) Load your service as follows
 
$sparql = $this->get('easyrdf.sparql.connection');
$select = 'select * {?s ?p ?o} limit 100';
$rows = $sparql->query($select);
Etiquetas