PHPackages                             thenetimp/simple-rest-server - 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. thenetimp/simple-rest-server

ActiveLibrary[API Development](/categories/api)

thenetimp/simple-rest-server
============================

A simple REST server implementation.

05PHP

Since Aug 31Pushed 11y ago1 watchersCompare

[ Source](https://github.com/thenetimp/SimpleRestServer)[ Packagist](https://packagist.org/packages/thenetimp/simple-rest-server)[ RSS](/packages/thenetimp-simple-rest-server/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Simple Rest Server
==================

[](#simple-rest-server)

A simple rest server written in PHP. After frustrations with other php frameworks to do things that should be relatively simple I have created Simple Rest Server framework. It is not tied to any specific ORM. Forces very little upon the programmer. It provides methods of authentication via http\_basic and http\_digest authentication built in, and provides a way to extend security so a user could tie it into another authentication method.

The Core of the framework is stored in the src/ directory and consists of 5 files over 2 directories. The Kernel which manages everything. The ControllerBase which controllers extend to provide functionality.

Anatomy of a Request.
=====================

[](#anatomy-of-a-request)

Say your API service is located at  and someone wants to call the resource /user/profile/1. The request URL contains the information needed to route the request to the right controller and action.

- user = Controller = app/src/Bundle/Controler/UserController.php
- profile = action = profileGetAction
- 1 = parameter 1 of the action method
- additional segments will become additional parameters in the method.

The request URI is broken up like this. method, ction and them parameters therefore to use a GET method on /user/profile/1 the method name in UserController is profileGetAction()

```
