This integration tested on Zend Framework 1.11.10, Twig 1.20 and PHP 5.3.8.
- Download Twig and place contents of
lib/Twigfolder to/path/to/app/library/Twig. - Place
Appfolder to/path/to/app/libraryfolder. - Update files of
/path/to/app/application/views/scriptswithapplication/views/scriptsfiles.
Add following lines to your application.ini file.
[production]
autoloaderNamespaces[] = "App"
autoloaderNamespaces[] = "Twig"
pluginPaths.App_Resource_ = "App/Resource/"
resources.twig.cache = "/path/to/cache/folder"
[development : production]
resources.twig.debug = true
Note : This integration changes your view filenames extension to twig instead of phtml.