Swiffers / TmsRestBundle

A service which brings support for "hypermedia" links for REST web services (based on FosRestBundle)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RestBundle

Symfony2 REST bundle

Installation

Add dependencies in your composer.json file:

"repositories": [
    ...,
    {
        "type": "vcs",
        "url": "https://github.com/Tessi-Tms/TmsRestBundle.git"
    }
],
"require": {
        ...,
        "tms/rest-bundle": "dev-master"
    },

Install these new dependencies of your application:

$ php composer.phar update

Enable the bundle in your application kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Tms\Bundle\RestBundle\TmsRestBundle(),
    );
}

Import the bundle configuration:

# app/config/config.yml

imports:
    - { resource: @TmsRestBundle/Resources/config/config.yml }

To check if every thing seem to be ok, you can execute this command:

$ php app/console container:debug

You'll get this result:

...
tms_rest.criteria_builder   container Tms\Bundle\RestBundle\Criteria\CriteriaBuilder
tms_rest.entity_handler     container Tms\Bundle\RestBundle\EntityHandler\EntityHandler
tms_rest.sort_builder       container Tms\Bundle\RestBundle\Sort\SortBuilder
...

Documentation

Read the Documentation

Tests

Install bundle dependencies:

$ php composer.phar update

To execute unit tests:

$ phpunit --coverage-text

About

A service which brings support for "hypermedia" links for REST web services (based on FosRestBundle)

License:MIT License


Languages

Language:PHP 100.0%