Skip to content

Instantly share code, notes, and snippets.

@lox
Created October 25, 2010 04:56
Show Gist options
  • Save lox/644433 to your computer and use it in GitHub Desktop.
Save lox/644433 to your computer and use it in GitHub Desktop.
<?php
/*
Ergo benefits:
- Bare bones: basic MVC, routing, templates, error handling
- Build on PHP 5.3: closures, namespaces, late static binding
- Designed for building RESTful systems, quickly
*/
require_once('ergo.php');
Ergo::router()->connect('/helloworld', 'helloworld', function() {
return Ergo::template('helloworld.tpl.php', array(
'greeting'=>'Hello World'
));
});
Ergo::router()->connect('/*', 'any', function() {
throw new \Ergo\Http\NotFound("Not implemented yet");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment