Tonic is an open source less is more, RESTful Web application development PHP library designed to do things "the right way", where resources are king and the library gets out of the way and leaves the developer to get on with it.

To understand Tonic, you need to get the Web, so forget everything you know for a minute and think about how the Web really works, it's not about HTML pages, it's about resources:

Tonic helps you develop Web applications that embrace the way the Web really works, enabling your applications to scale, extend and work with other systems easily.

Quick Example

resource/hello.php

Features

URI annotations
Resources are attached to their URL by a @uri annotation.
Content negotiation
Content and language negotiation support allowing you to easily pick the best representation for the client request.
Method conditions
Custom conditions can be added to methods via annotations allowing for conditional routing behaviour to be easily encapsulated.
Mount points
Mount namespaces of resources into any URL-space to make them portable.

Download

The easiest way to install Tonic is to use Composer:

Alternatively, head to our Github page and do the download.

Created Jan 1, 2010, last modified Jul 4, 2012