Making PHP development fun again.
The finest Leaf in the Southfarthing is also a web framework similar to Sinatra.
Built on Rack'em.
Toby works best with Composer. Add it to your composer.json
{
"require": {
"toby/toby": "dev-master"
},
"minimum-stability": "dev"
}$ composer install<?php
# config.php
require 'vendor/autoload.php';
$app = new \Toby\Base();
$app->get('/',function() {
return "<h1>Hello World!</h1>";
});
return $app->run();
?>$ vendor/bin/rackem
$ open http://localhost:9393- routing (
DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT) - route matching (
$app->get("/hello/:name");) - render templates and layouts
- currently supported:
php,mustache,markdown,haml
- currently supported:
- conditions and filters
- redirection
- halting
- passing routes
- error handling (
errornot_foundhalt(500)) - logging via Rackem\Logger
- settings
- configure blocks (global and per environment)
- completely Rack complient (using Rack'em)
- serving static files
- handling file uploads
- handling sessions (
$app->enable("sessions");) - flash messaging (
$app->flash("error","Gah! Something happened!");)
- support for more templating engines. (twig, jade, etc.)