PHPackages                             manticora/rest-extra-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. [API Development](/categories/api)
4. /
5. manticora/rest-extra-bundle

ActiveLibrary[API Development](/categories/api)

manticora/rest-extra-bundle
===========================

Utilities for Symfony Rest Services

0.1(12y ago)722MITPHP

Since Apr 12Pushed 12y ago2 watchersCompare

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

READMEChangelogDependencies (3)Versions (3)Used By (0)

RestExtraBundle
===============

[](#restextrabundle)

[![Build Status](https://camo.githubusercontent.com/7a97f791cd50533224136409dfdb90f66a048e7161f55e393458415785bf7500/68747470733a2f2f7472617669732d63692e6f72672f6d6769757374696e69616e692f4d616e7469636f7261476f6f676c654665646572617465644c6f67696e42756e646c652e737667)](https://travis-ci.org/mgiustiniani/ManticoraGoogleFederatedLoginBundle)

Utilities for Symfony Rest Services

Usage
-----

[](#usage)

### Router Expression Language Injection

[](#router-expression-language-injection)

Injecting the Router expression Language you can use the the custom Expression Language class in the routing conditions, this class contains the PHP version\_compare function for versioning rest web services

```
    /**
     * @Get("notes", condition="compare(request.attributes.get('version'),'1', '=')")
     */
    public function cgetNewVersionAction()
    {
        echo 'new version';

        return $this->getRepository()->findAll();
    }
```

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

[](#installation)

### Download Packages

[](#download-packages)

Add the following lines in your `composer.json` file:

```
{
    "require": {
        "manticora/rest-extra-bundle": "0.1"
    }
}
```

Now, run composer.phar to download the bundle:

```
$ php composer.phar install
```

**Note:** You can immediately start using it. The autoloading files have been generated by composer and already included to the app autoload file.

### Step 2: Enable the bundle

[](#step-2-enable-the-bundle)

Finally, enable the bundle in the kernel:

```
