ml/hydra-bundle

JSON-LD Processor for PHP

dev-master 2018-06-24 10:04 UTC

This package is auto-updated.

Last update: 2024-03-25 19:11:09 UTC


README

Hydra is a lightweight vocabulary to create hypermedia-driven Web APIs. By specifying a number of concepts commonly used in Web APIs it renders the creation of generic API clients possible.

This is a Symfony2 bundle which shows how easily Hydra can be integrated in modern Web frameworks. It acts as a proof of concept to show how Hydra can simplify the implementation of interoperable and evolvable RESTful APIs.

WARNING: This is highly experimental stuff that isn't ready for production use yet.

To participate in the development of this bundle, please file bugs and issues in the issue tracker or submit pull requests. If you have questions regarding Hydra in general, join the Hydra W3C Community Group.

You can find an online demo of this bundle as well as more information about Hydra on my homepage: http://www.markus-lanthaler.com/hydra

Installation

You can install this bundle by running

composer require ml/hydra-bundle dev-master

or by adding the package to your composer.json file directly

{
    "require": {
        "ml/hydra-bundle": "dev-master"
    }
}

After you have installed the package, you just need to add the bundle to your AppKernel.php file:

// in AppKernel::registerBundles()
$bundles = array(
    // ...
    new ML\HydraBundle\HydraBundle(),
    // ...
);

and import the routes in your routing.yml file:

hydra:
    resource: "@HydraBundle/Controller/"
    type:     annotation
    prefix:   /

Credits

This bundle heavily uses the Doctrine Common project and is inspired by its object relational mapper. The code generation is based on Sensio's SensioGeneratorBundle.