PHPackages                             rizeway/orem - 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. rizeway/orem

ActiveLibrary[HTTP &amp; Networking](/categories/http)

rizeway/orem
============

Rizeway OREM is a Restful API Abstraction Layer. It is to Restful APIs what doctrine is for databases.

v1.0.0(10y ago)266.1k3[1 PRs](https://github.com/youknowriad/OREM/pulls)MITPHPPHP &gt;=5.4

Since Jul 5Pushed 10y ago3 watchersCompare

[ Source](https://github.com/youknowriad/OREM)[ Packagist](https://packagist.org/packages/rizeway/orem)[ RSS](/packages/rizeway-orem/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (4)Versions (5)Used By (0)

Rizeway OREM
============

[](#rizeway-orem)

[![Build Status](https://camo.githubusercontent.com/c8294edff2bba96f15fdde3c2fd19a2f1e0c5eb02778eb3ca435e6d2d3e9c295/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f796f756b6e6f77726961642f4f52454d2e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/youknowriad/OREM)

Rizeway OREM is a Restful API Abstraction Layer. It is to Restful APIs what doctrine is to databases.

Getting Started
---------------

[](#getting-started)

Say you have the following JSON HTTP API to make CRUD on an object named "status"

```
GET /status # Return a list of statuses
GET /status/1 # Return the status of id 1
POST /status # Create a status (the body of the request contain the hash of the status)
PUT /status/1 # Update the status of id 1 (the body of the request contain the hash of the status)
DELETE /status/1 # Delete the status of id 1

```

1- Create a folder to store your mappings.

2- Create a mapping file in this folder. The mapping file sould be named status.orem.yml and will look like this.

```
class: MyNamespace/Status
fields:
    id:
        primaryKey: true
    message:
        type: string
    author:
        type: string
    count_likes
        type: integer
```

3- Create a simple entity class

```
