Coding

I want StringTemplate for PHP

Published · 1min

Ever since reading Terence Parr’s Enforcing Strict Model-View Separation in Template Engines (PDF), I’ve wanted something like StringTemplate for PHP.

Maybe not something exactly the same, but a templating system that would perform similarly as far as the person developing the templates would be concerned, but the coder populating the templates would instead be talking to a class generated from the template itself. In essence, a StringTemplate compiler for PHP.

But is there anything like that? Unfortunately, no. It’d almost drive a man to write something like it…