mikekelly/glue — pull request #1 by asperous (2012-10-12 21:43:09+00:00)
Title: Not really a pull request, just a completly different way to approach glue

I don't think glue should be coupled with a templating library by default so this isn't a pull request, but I just wanted to show you some changes I made to glue for my production product that really helped me.

You might consider making some of them for the next version.

1. In order for Smarty (my template engine) to be in scope for my controllers without using global variables, so I had to couple it with glue by passing it though.
1. I wanted glue::stick to be the last line of my index.php file, so I included the pagenotfound controller in there.
1. I was writing a TON of boilerplate (see route and then go to file) so I mapped paths to files instead. Really cleaned up things.
1. I then had a lot of files that only did $smarty->display('template.tpl') so I had glue look for the .tpl at the controller regular expression, and just run $smarty->display(path) instead. This cleaned up things a ton.
1. For some reason GET variables were not ignored in your version of glue, so I changed the regular expression to filter those out