public function render($content, $class = '', $id = '', array $attrs = array())
    {
        $attrs = $this->_setId($attrs, $id);
        $attrs = $this->_cleanAttrs($attrs);

        if (!empty($class)) {
            $attrs = $this->_normalizeClassAttr($attrs, $class);
        }

        $tag = $this->_tag;
        if (Arr::key('tag', $attrs)) {
            $tag = $attrs['tag'];
            unset($attrs['tag']);
        }

        $format = (!empty($attrs)) ? '<%s %s>%s</%s>' : '<%s%s>%s</%s>';
        $output = sprintf($format, $tag, $this->buildAttrs($attrs), $content, $tag);

        return $output;
    }
public function render($content, $class = '', $id = '', array $attrs = array())
    {
        $attrs = $this->_setId($attrs, $id);
        $attrs = $this->_cleanAttrs($attrs);

        if (!empty($class)) {
            $attrs = $this->_normalizeClassAttr($attrs, $class);
        }

        $tag = $this->_tag;
        if (Arr::key('tag', $attrs)) {
            $tag = $attrs['tag'];
            unset($attrs['tag']);
        }

        $format = (!empty($attrs)) ? '<%s %s>%s</%s>' : '<%s%s>%s</%s>';
        $output = sprintf($format, $tag, $this->buildAttrs($attrs), $content, $tag);

        return $output;
    }
public function render ( $ content , $ class = '' , $ id = '' , array $ attrs = array ( ) ) { $ attrs = $ this -> _setId ( $ attrs , $ id ) ; $ attrs = $ this -> _cleanAttrs ( $ attrs ) ; if ( ! empty ( $ class ) ) { $ attrs = $ this -> _normalizeClassAttr ( $ attrs , $ class ) ; } $ tag = $ this -> _tag ; if ( Arr :: key ( 'tag' , $ attrs ) ) { $ tag = $ attrs [ 'tag' ] ; unset ( $ attrs [ 'tag' ] ) ; } $ format = ( ! empty ( $ attrs ) ) ? '<%s %s>%s</%s>' : '<%s%s>%s</%s>' ; $ output = sprintf ( $ format , $ tag , $ this -> buildAttrs ( $ attrs ) , $ content , $ tag ) ; return $ output ; }
Create html tag.

@param string $content
@param array|string $class
@param string $id
@param array $attrs
@return string
Create html tag .