toby / toby
Put 'ol Toby in your pipe and smoke it. A micro web framework similar to Sinatra that makes PHP fun again.
v0.2
2014-09-10 12:39 UTC
Requires
- php: >=5.3.0
- rackem/rackem: @stable
This package is not auto-updated.
Last update: 2024-04-27 11:19:31 UTC
README
Making PHP development fun again.
The finest Leaf in the Southfarthing is also a web framework similar to Sinatra.
Built on Rack'em.
Setting Up
Toby works best with Composer. Add it to your composer.json
{ "require": { "toby/toby": "dev-master" }, "minimum-stability": "dev" }
$ composer install
Hello World
<?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
Check out the manual
What we have so far
- 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 (
error
not_found
halt(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!");
)
What needs doing
- support for more templating engines. (twig, jade, etc.)