Popularity
2.3
Growing
Activity
0.0
Stable
85
8
12

Description

This library allows you to quickly annotate your doctrine entities into restful resources. It comes shipped with it's own internal router, and can be used standalone or alongside your existing framework stack. Routes are mapped to either a default or customised service action that takes care of handling requests.

Setting up endpoints is as easy as adding in a simple annotation to an entity

Code Quality Rank: L5
Monthly Downloads: 21
Programming language: PHP
License: MIT License
Tags: API     REST     Doctrine2    
Latest version: v1.0.5

Drest alternatives and similar libraries

Based on the "API" category.
Alternatively, view Drest alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of Drest or a related project?

Add another 'API' Library

README

Drest

Dress up doctrine entities and expose them as REST resources

Build Status Code Coverage Scrutinizer Quality Score Latest Stable Version Total Downloads Dependency Status HHVM Status License

This library allows you to quickly annotate your doctrine entities into restful resources. It comes shipped with it's own internal router, and can be used standalone or alongside your existing framework stack. Routes are mapped to either a default or customised service action that takes care of handling requests.

Setting up endpoints is as easy as adding in a simple annotation to an entity

/* @Drest\Resource(
 *    routes={
 *        @Drest\Route(
 *            name="get_user",
 *            route_pattern="/user/:id",
 *            verbs={"GET"}
 * )})
 * @ORM\Table(name="user")
 * @ORM\Entity
 */
class User
{
   .......
}

// hitting [GET] http://myapplication.com/user/123 may return:

{
  "user": {
    "name": "lee",
    "email": "[email protected]"
    ... + other attributes set up to be exposed ...
  }
}

Documentation

Check out how to use drest by reading the documentation

Features

  • Quickly annotate existing Doctrine entities to become a fully functional REST resource.

  • Utilises the internal router for matching resource route patterns.

  • Specify what data you want to expose from your entities (including relations), or let the client choose!

  • Generate data objects using exposable data for your API users to consume.

  • Comes shipped with both JSON and XML representations, or you can create your own.

  • Allows media type detection from your client requests, getting you one step close to RMM level 3.

  • Use it independently from your existing framework stack, or alongside it.

  • Allows extension points so you can configure requests to your specific needs.


*Note that all licence references and agreements mentioned in the Drest README section above are relevant to that project's source code only.