Skip to content

Instantly share code, notes, and snippets.

@h0lyalg0rithm
Created August 3, 2014 19:10
Show Gist options
  • Save h0lyalg0rithm/3e22bdd2028a25adb082 to your computer and use it in GitHub Desktop.
Save h0lyalg0rithm/3e22bdd2028a25adb082 to your computer and use it in GitHub Desktop.
Routing example with Toro
FallbackResource /index.php
require 'Toro.php'
class RootHandler{
function get(){
echo 'Root';
}
}
Toro::add('404',function(){
header("HTTP/1.0 404 Not Found");
echo "<h1>404 Page Not Found</h1>";
exit;
});
Toro::server(array(
'/' => 'RootHandler'
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment