Skip to content

Instantly share code, notes, and snippets.

@Chavao
Created November 13, 2012 13:10
Show Gist options
  • Save Chavao/4065696 to your computer and use it in GitHub Desktop.
Save Chavao/4065696 to your computer and use it in GitHub Desktop.
<?
set_include_path('/var/www/Loader/library'. PATH_SEPARATOR . get_include_path());
spl_autoload_register(include 'Respect/Loader.php');
use \Respect\Rest\Router;
$r3 = new Router;
$r3->get('/c/*/*', function($id, $slug){
echo "Conteudo <br/>Id: {$id}<br/> slug: {$slug}";
});
$r3->get('/e/*/*', function($id, $slug){
echo "Entidade <br/>Id: {$id}<br/> slug: {$slug}";
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment