villimagg/php-mvc-twig — pull request #1 by Dinduks (2012-05-22 21:41:15+00:00)
Title: Suggestions

Greetings from Stack Overflow,

I've answered your question regarding Twig there (I'm Samy Dindane).

I quickly changed some stuff to give you an idea about how you can improve your code.
But here's few other comments:

* Install Twig as a submodule. The most important benefit from this, is that you'll be able to update Twig with one single command.
`git submodule add https://github.com/fabpot/Twig.git vendors/Twig`
`git submodule init`
There one thing called packagist which is popular at the moment, give it a look.
* Use spaces instead of tabs. Thus your code would look the same everywhere.
* Use a code convention, I suggest Symfony2's one.
* Rewrite the render function so it can take a second argument which is the variables to pass to the view.

There's many other things, but I don't have the time to fix them/mention them all. Maybe in the future. :)

Also, take a look at my ChaoticCard repo, it's based on Silex, but I tried to it the MVC way. It may not be perfect, but it has some ideas to can base yourself on to improve your pet project.

Good luck!