PHPackages                             matmar10/rest-api-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. matmar10/rest-api-bundle

ActiveSymfony-bundle[HTTP &amp; Networking](/categories/http)

matmar10/rest-api-bundle
========================

A Symfony Bundle that enables the use of @Api annotation to automatically serialize any return value from any controller using JMS Serializer.

0.3.2(12y ago)2191[3 issues](https://github.com/matmar10/rest-api-bundle/issues)ApachePHPPHP &gt;=5.3.3

Since Jul 8Pushed 11y ago1 watchersCompare

[ Source](https://github.com/matmar10/rest-api-bundle)[ Packagist](https://packagist.org/packages/matmar10/rest-api-bundle)[ RSS](/packages/matmar10-rest-api-bundle/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (7)Versions (11)Used By (0)

REST API Bundle
===============

[](#rest-api-bundle)

A Symfony Bundle that enables the use of @Api annotation to automatically serialize any return value from any controller using JMS Serializer.

This bundle uses the popular (JMS Serializer Bundle)\[\] for all serialization.

JMS Serialize annotation entities are serialized accordingly.

Installation
------------

[](#installation)

Add to your Symfony project composer file:

```
   "require": {
       "matmar10/rest-api-bundle": "~0.3.2"
   },
   ...
```

Add the bundle to the Kernel and run composer update:

```
    // in app/AppKernel.php
    public function registerBundles()
    {
        $bundles = array(
            ...
            new Matmar10\Bundle\RestApiBundle\Matmar10RestApiBundle(),
        );

    }
```

Annotate a controller method; return value will automatically be serialized into JSON or XML:

```
