Inner class to build some very basic html nodes

author etessore
version 1.0.0
package classes

 Methods

Gets the closing html tag for the given one

close_tag(string $tag) : string
Static

Parameters

$tag

string

the html tag

Returns

stringthe closing tag

Retrieves the correct DOCTYPE

doctype() 
Static

Returns the <html> opening tag from html5 boilerplate

open_html(string | array $class) 
Static

Parameters

$class

stringarray

some additional classes

Gets the opening html tag for the given one

open_tag(string $tag, array $params) : string
Static

Parameters

$tag

string

the html tag

$params

array

the additional parameters

Returns

stringthe opening tag

Retrieves the list of self-closing tags

self_closing_tags() : array
Static

Returns

arraya list of self-closing tags

Builds a default tag structure: <tagname tagparameters>inner_html</tagname>

standard_tag(string $tag, string $inner_html, array $parms) 
Static

Parameters

$tag

string

the tag

$inner_html

string

the inner html

$parms

array

the additional html tag parameters

Generates HTML Node Attribures

array_to_html_attributes(string $glue, array | string $pieces) : string
Static
author http://blog.teknober.com/2011/04/13/php-array-to-html-attributes/

Parameters

$glue

string

$pieces

arraystring

Returns

string

Retrives the attributes list choosing between the given parameters

get_html_attributes(string | array $inner_html, array $params) : string
Static

Parameters

$inner_html

stringarray

the inner html

$params

array

the parameters

Returns

stringthe html tag attributes ready to be printed in the DOM

Prepare the $parms to be printed as html attributes

params(array $parms) 
Static

Parameters

$parms

array

list of html attributes

 Constants

 

<p>value of the version of the html/xhtml used useful to have different behavior if not using HTML 5</p>

HTML_VERSION : string