Yii 1.1: yii-html-tag

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

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

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

Installation

Add a dependency to your project's composer.json:

{
    "require": {
        "petrgrishin/yii-html-tag": "dev-master"
    }
}

Usage examples

Create tag

use \PetrGrishin\HtmlTag\HtmlTag;
 
$tag = HtmlTag::create(HtmlTag::TAG_DIV, array('class' => 'content'))->begin();
$tag->addClass('well');
 
printf('content');
 
$tag->end();
// output: <div class="content well">content</div>

Be the first person to leave a comment

Please to leave your comment.

Create extension