public function getHtml($attribute = null)
        {
            if(null !== $attribute) {
                $attribute = strval($attribute);
                if(\Thin\Arrays::exists($attribute, $this->attributes)) {
                    return $attribute . '="' . implode(' ', $this->attributes[$attribute]) . '"';
                }
            } else {
                $return = array();
                foreach(array_keys($this->attributes) as $attrib) {
                    $return[] = $this->getHtml($attrib);
                }
                return implode(' ', $return);
            }

            return '';
        }
public function getHtml($attribute = null)
        {
            if(null !== $attribute) {
                $attribute = strval($attribute);
                if(\Thin\Arrays::exists($attribute, $this->attributes)) {
                    return $attribute . '="' . implode(' ', $this->attributes[$attribute]) . '"';
                }
            } else {
                $return = array();
                foreach(array_keys($this->attributes) as $attrib) {
                    $return[] = $this->getHtml($attrib);
                }
                return implode(' ', $return);
            }

            return '';
        }
public function getHtml ( $ attribute = null ) { if ( null !== $ attribute ) { $ attribute = strval ( $ attribute ) ; if ( \ Thin \ Arrays :: exists ( $ attribute , $ this -> attributes ) ) { return $ attribute . '="' . implode ( ' ' , $ this -> attributes [ $ attribute ] ) . '"' ; } } else { $ return = array ( ) ; foreach ( array_keys ( $ this -> attributes ) as $ attrib ) { $ return [ ] = $ this -> getHtml ( $ attrib ) ; } return implode ( ' ' , $ return ) ; } return '' ; }
Generate the HTML code for the attributes

@param string $attribute The attribute for which HTML code is to be generated. Omit the parametre to generate HTML code for all attributes.

@return string HTML code
Generate the HTML code for the attributes