I'm looking for a PHP framework that would allow me to create HTML, not through a templating system like Smarty or Twig (which I really don't like), but directly from my view classes, through methods like:
$this->elementStart('div', array('id' => 'header',
'class' => 'cls'));
...
$this->elementEnd('div');
StatusNet does that, but it's not really a general-purpose framework. Are there any frameworks that work that way?
You can check out Yii. There isn't a template's system like Smarty or anything, you just have your view files with HTML and whatever PHP variables you pass over from your controllers.
EDIT: Heres an old example view I found, didn't have a link so I just pasted. The stuff referencing "widget" etc is just components of the framework, not template engine stuff.