|
|
|
|
|
by cosmo7
6269 days ago
|
|
My project, phpSprockets (http://code.google.com/p/phpsprockets/) does nested markup by working as a node system. After all, if you're going to generate HTML in code you might as well do it in an object oriented way. $table = new Sprocket( 'table' ); $tr = $table->tr(); $tr->td( "OMG I'm in a sprocket" ); I've done similar things using XElement in C#, though using PHP's magic methods makes for very short readable code. I agree that templates are handy for separation of concerns though. |
|