Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/petrgrishin/yii-html-tag

Builder to create a html tag, an object-oriented approach
https://github.com/petrgrishin/yii-html-tag

Last synced: 23 days ago
JSON representation

Builder to create a html tag, an object-oriented approach

Awesome Lists containing this project

README

        

yii-html-tag
============

Builder to create a html tag, an object-oriented approach

Installation
------------
Add a dependency to your project's composer.json:
```json
{
"require": {
"petrgrishin/yii-html-tag": "~1.0"
}
}
```

Usage examples
--------------
#### Create tag
```php
use \PetrGrishin\HtmlTag\HtmlTag;

$tag = HtmlTag::create(HtmlTag::TAG_DIV, array('class' => 'content'))->begin();
$tag->addClass('well');

print('content');

$tag->end();
// output:

content

```