PHPackages                             rawebone/razor-library - 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. rawebone/razor-library

ActiveLibrary

rawebone/razor-library
======================

Provides the core Razor handling

2390[1 PRs](https://github.com/rawebone/Razor/pulls)PHP

Since Jul 21Pushed 11y ago2 watchersCompare

[ Source](https://github.com/rawebone/Razor)[ Packagist](https://packagist.org/packages/rawebone/razor-library)[ RSS](/packages/rawebone-razor-library/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

Razor
=====

[](#razor)

Razor is a lightweight micro framework based around the concept of REST. It is similar to a number of projects like [Slim](http://www.slimframework.com)and [Silex](http://silex.sensiolabs.org/) but is designed to be syntactically nicer to use, from personal preference.

As noted above the framework is focused around RESTful web applications. Lets say we are working on the obligatory TODO application- we are going to have an *end point* in our API that represents the collection of TODO items or, more correctly, *resources*.

To model this in Razor, we would create a file in our web-facing folder called `todos.php` which would contain the following code:

```
