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:
- Everything useful is a resource, not a file, not a CGI script, a resource, an abstract concept of something useful that the client wants to grab hold of.
- Resources are located by URLs, URLs are cheap and form the universal addressing system of the Web.
- Clients can issue a standard number of HTTP methods upon an infinite number of resources and receive something useful in return.
- Representations of resources are sent back to the client, a representation is just a way of turning the abstract concept of a resource into something more concrete, like a HTML page or a XML file. One resource can have many different representations.
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.
- 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.
The easiest way to install Tonic is to use Composer:
Alternatively, head to our Github page and do the download.