PHPackages                             rroek/rest-component-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. rroek/rest-component-bundle

ActiveSymfony-bundle[API Development](/categories/api)

rroek/rest-component-bundle
===========================

BlackBox to easy generate RESTful HATEOAS API

v1.0.6(7y ago)6271proprietaryPHPPHP &gt;=7.0

Since Mar 12Pushed 7y ago4 watchersCompare

[ Source](https://github.com/RRoek/RestComponentBundle)[ Packagist](https://packagist.org/packages/rroek/rest-component-bundle)[ RSS](/packages/rroek-rest-component-bundle/feed)WikiDiscussions develop Synced 2w ago

READMEChangelogDependencies (16)Versions (9)Used By (0)

RestComponentBundle
===================

[](#restcomponentbundle)

### Features

[](#features)

- Give you ability to to easier &amp; faster make great RESTful HATEOAS Apis

**Table of Contents**

\[TOCM\]

\[TOC\]

Introduction
------------

[](#introduction)

This bundle is initially forked from [Sulu CMS (a CMF based on Symfony CMF)](https://github.com/sulu/sulu "Sulu CMS (a CMF based on Symfony CMF)"). It give you ability to to easier &amp; faster make great RESTful HATEOAS Apis.

It require [friendsofsymfony/rest-bundle](https://github.com/FriendsOfSymfony/FOSRestBundle "friendsofsymfony/rest-bundle") &amp; [willdurand/hateoas-bundle](https://github.com/willdurand/Hateoas "willdurand/hateoas-bundle"). And is placed on top of this bundles.

### Advantages

[](#advantages)

Easier. Faster. Make great RESTful HATEOAS APIs !

Use
---

[](#use)

### Activate bundle

[](#activate-bundle)

To use it, simply `composer require rroek/rest-component-bundle`and enable it : in AppKernel.php :

```
     /**
         * @return array
         */
        public function registerBundles()
        {
            $bundles = [
    		[...]
    		new RRoek\RestComponentBundle\RRoekRestComponentBundle(),
    		[...]
```

### Make your Controller

[](#make-your-controller)

For this example, we will take "MyPersonalEntity" class wich is an *Doctrine Entity* in our Symfony Project.

Our Entity will have an id, a label, a relation with another entity &amp; getters/setters for it.

#### So let's see interresting things :

[](#so-lets-see-interresting-things-)

I want to make my Controller. it job is to give access to my entity &amp; make is CRUD callable. We will use [nelmio/NelmioApiDocBundle](https://github.com/nelmio/NelmioApiDocBundle "nelmio/NelmioApiDocBundle") to generate our apiDoc. So lets create our Controller :

---

In :

```
MyBundle
	Controller
		RestController
			MyEntityRestController.php
	Entity
		MyPersonalEntity.php
	...

```

---

```
