Respect/Template — Issue #12: Developer API
Author: augustohp
Created: 2011-12-21 04:51:05+00:00
State: open
Labels: brainstorm, ♥

Actually we removed a lot of burden from the designer and threw a lot of work into the PHP developer. We really have to remove this burden to the maximum before we can continue, look at what about i'm saying:

Take a look to the example:

```php
$template = new Html('./cssZenGarden.html');
$template['title'] = 'Respect\Template: A different template engine';
$template['#pageHeader h1'] = 'Respect\Template';
$template['#pageHeader h2'] = 'A different template engine';
```

This does not imposes fear, but think of the CSS style importer, the links, the acronym and so on ....
The markup to the developer will become messy.

A solution would be to have a "HTMLElement" class

```php
$acronym = new HtmlElement('acronym');
$acronym->title = 'Respect Template Awesomeness';
$acronym->innerHtml = 'Template';
$template = new Html('./cssZenGarden.html');
$template['.p1 acronym'] = $acronym;
```

What do you think about it? Can't come up with a better solution for this by now.