easyrdf-bundle, a Symfony bundle for EasyRDF

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.

Usage

  • Add to your composer.json the following lines
    "repositories": [
        {
            "type": "vcs",
            "url": "<a href="https://github.com/asanchez75/easyrdf-bundle.git">https://github.com/asanchez75/easyrdf-bundle.git</a>"
        }
    ],
    "require": {
        "conjecto/easyrdf-bundle": "dev-master as 0.1"
    },
  • Launch composer update inside your Symfony Application

  • Define a global parameter sparql_endpoint in your file app/config/config.yml

parameters:
    sparql_endpoint: http://localhost:8890/sparql

Be aware that the parameter %sparql_endpoint% is used in the file

https://github.com/asanchez75/easyrdf-bundle/blob/master/Resources/config/services.xml

  • Add the bundle to your file app/AppKernel.php
new Conjecto\Bundle\EasyRdfBundle\EasyRdfBundle();
  • Load your service as follows
$sparql = $this->get('easyrdf.sparql.connection');
$select = 'select * {?s ?p ?o} limit 100';
$rows = $sparql->query($select);
Etiquetas