Permalink
Switch branches/tags
Find file
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (18 sloc) 671 Bytes
Frank.php is a clone of Sinatra.rb. It's much like Sinatra, with a few things missing (because php is stupid, or because I haven't gotten around to it yet).
What Frank.php is missing:
1. Spiffy template languages like haml and sass.
2. Error handling besides not_found(function(){});
3. Environments
4. Testing
5. Routes with a block parameter. You'll have to use $params['captures'][0] instead.
Here is Sinatra's hello world:
require 'sinatra'
get "/" do
"Hello, World"
end
And here is Frank.php's hello world:
require 'frank/frank.php';
get("/", function(){
echo "Hello, World";
});
As you can see, they're fairly similar. Check out index.php for more examples.