From http://fabien.potencier.org/article/50/create-your-own-framework-on-top-of-the-symfony2-components-part-1