PHPackages                             flyr/flyr - 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. [Framework](/categories/framework)
4. /
5. flyr/flyr

AbandonedArchivedLibrary[Framework](/categories/framework)

flyr/flyr
=========

The micro PHP Framework based for develop fast REST applications.

2.x-dev(8y ago)011MITPHP

Since Feb 20Pushed 8y ago1 watchersCompare

[ Source](https://github.com/SiroDiaz/Flyr)[ Packagist](https://packagist.org/packages/flyr/flyr)[ RSS](/packages/flyr-flyr/feed)WikiDiscussions 1.0 Synced 1mo ago

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

[![Flyr framework](https://camo.githubusercontent.com/95c13657adcfa6f7df3f1a48cf36ea656fdcbbb5667fd3d95f18677c4f1d6d5b/687474703a2f2f6f6935392e74696e797069632e636f6d2f3334386b3878302e6a7067)](https://camo.githubusercontent.com/95c13657adcfa6f7df3f1a48cf36ea656fdcbbb5667fd3d95f18677c4f1d6d5b/687474703a2f2f6f6935392e74696e797069632e636f6d2f3334386b3878302e6a7067)
===========================================================================================================================================================================================================================================================================================================================================================================

[](#)

[![Build Status](https://camo.githubusercontent.com/556012620edcf91cfd0a1f027595dc5053d87990f33aa9b8089f77982d3da660/68747470733a2f2f7472617669732d63692e6f72672f5369726f4469617a2f466c79722e737667)](https://travis-ci.org/SiroDiaz/Flyr)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0888ca78fb79c51bd8892435bc2cf36bebe109c1693274043dffe6ff50020272/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5369726f4469617a2f466c79722f6261646765732f7175616c6974792d73636f72652e706e673f623d312e30)](https://scrutinizer-ci.com/g/SiroDiaz/Flyr/?branch=1.0)[![Coverage Status](https://camo.githubusercontent.com/1fa17f5acf62e2555f857666399ebe82694afbc6aa1f852253e6ef4a4e53d13a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f5369726f4469617a2f466c79722f62616467652e737667)](https://coveralls.io/r/SiroDiaz/Flyr)

Flyr: The PHP micro Framework for develop fast REST applications.
=================================================================

[](#flyr-the-php-micro-framework-for-develop-fast-rest-applications)

**Flyr** is a micro famework designed to create REST applications easily and also to be the skeleton for develop an application in which you want to install your own libraries or from third party. Also it tries to apport a MVC model to organize your code and apply design patterns. Flyr includes some third party libraries to make easier the development of its components as [PHPMailer](https://github.com/PHPMailer/PHPMailer), [Twig](https://github.com/twigphp/Twig). I suggest you to use a real ORM like Doctrine or also you can use Propel which have a great documentation.

**Please** if you find an error in the documentation you can modify it or warm me.

### **Requirements**

[](#requirements)

- PHP 5.4.0 or newer
- Composer
- mcrypt(recomended)

### **Download and install**

[](#download-and-install)

You can download Flyr from the .zip file or using Composer running this command

```
$ composer create-project "flyr/flyr":"1.0.*@dev"

```

### **Simple tutorial**

[](#simple-tutorial)

#### **Routes and request methods**

[](#routes-and-request-methods)

Flyr API is easy. You must know a short list of methods and then you can extend the API as many as you want. First of all you are going to know how create routes in your **index.php** file, located in the app folder. Routes are easy and simple in the current version. The following route patterns are correct: /, /new, /user/:id, /post/:id/:slug, etc. When you put two dots(:) after the slash you are telling to Flyr that it is a parameter and it could be any value you want. For example, the URI /post/1234/any-post-title matches with the last pattern, /post/:id/:slug.

Now you need catch the pattern, but how?. This is easy. HTTP has the 4 most important request methods(there are more than 4 methods but for the current version Flyr does not add support for all the rest), **GET**, **POST**, **PUT** and **DELETE**. You can use the get, post, put and delete method to receive the response. For example, you can use in your **index.php** this methods like you can see:

```
