Class html

Description

Class for HTML code creation

Located in /html.php (line 31)


	
			
Direct descendents
Class Description
 class html_inputfield Class to create an HTML input field
 class html_hiddenfield Class to create an hidden HTML input field
 class html_textarea Class to create an HTML textarea
 class html_select Builder for HTML drop-down menus
 class html_table Class to build an HTML table
Variable Summary
 static mixed $common_attrib
 static mixed $containers
 static mixed $doctype
 static mixed $lc_tags
 mixed $allowed
 mixed $attrib
 mixed $content
 mixed $tagname
Method Summary
 static string a (mixed $attr, string $cont)
 static string attrib_string ([array $attrib = array()], [array $allowed = null])
 static string br ()
 static string div ([mixed $attr = null], [string $cont = null])
 static void doctype ( $type)
 static string iframe ([mixed $attr = null], [ $cont = null])
 static string img ([mixed $attr = null])
 static string label (mixed $attr, string $cont)
 static string p ([mixed $attr = null], [string $cont = null])
 static string script (mixed $attr, [string $cont = null])
 static string span (mixed $attr, string $cont)
 static string tag (string $tagname, [array $attrib = array()], [string $content = null], [array $allowed_attrib = null])
 html __construct ([array $attrib = array()])
 string show ()
Variables
static mixed $common_attrib = array('id','class','style','title','align') (line 40)
  • access: public
static mixed $containers = array('iframe','div','span','p','h1','h2','h3','form','textarea','table','thead','tbody','tr','th','td','style','script') (line 41)
  • access: public
static mixed $doctype = 'xhtml' (line 38)
  • access: public
static mixed $lc_tags = true (line 39)
  • access: public
mixed $allowed = array() (line 35)
  • access: protected

Redefined in descendants as:
mixed $attrib = array() (line 34)
  • access: protected
mixed $content (line 36)
  • access: protected
mixed $tagname (line 33)
  • access: protected

Redefined in descendants as:
Methods
static a (line 171)

Derrived method for link tags

string a (mixed $attr, string $cont)
  • mixed $attr: Hash array with tag attributes or string with link location (href)
  • string $cont: Link content
static attrib_string (line 270)

Create string with attributes

  • return: Valid attribute string
  • access: public
string attrib_string ([array $attrib = array()], [array $allowed = null])
  • array $attrib: Associative arry with tag attributes
  • array $allowed: List of allowed attributes
static br (line 258)

Derrived method for line breaks

string br ()
static div (line 123)

Derrived method for <div> containers

string div ([mixed $attr = null], [string $cont = null])
  • mixed $attr: Hash array with tag attributes or string with class name
  • string $cont: Div content
static doctype (line 98)
  • access: public
void doctype ( $type)
  • $type
static iframe (line 219)

Derrived method to create <iframe></iframe>

string iframe ([mixed $attr = null], [ $cont = null])
  • mixed $attr: Hash array with tag attributes or string with frame source (src)
  • $cont
static img (line 154)

Derrived method to create <img />

string img ([mixed $attr = null])
  • mixed $attr: Hash array with tag attributes or string with image source (src)
static label (line 204)

Derrived method for form element labels

string label (mixed $attr, string $cont)
  • mixed $attr: Hash array with tag attributes or string with 'for' attrib
  • string $cont: Tag content
static p (line 139)

Derrived method for <p> blocks

string p ([mixed $attr = null], [string $cont = null])
  • mixed $attr: Hash array with tag attributes or string with class name
  • string $cont: Paragraph content
static script (line 236)

Derrived method to create <script> tags

string script (mixed $attr, [string $cont = null])
  • mixed $attr: Hash array with tag attributes or string with script source (src)
  • string $cont: Javascript code to be placed as tag content
static span (line 188)

Derrived method for inline span tags

string span (mixed $attr, string $cont)
  • mixed $attr: Hash array with tag attributes or string with class name
  • string $cont: Tag content
static tag (line 76)

Generic method to create a HTML tag

  • return: The XHTML tag
  • access: public
string tag (string $tagname, [array $attrib = array()], [string $content = null], [array $allowed_attrib = null])
  • string $tagname: Tag name
  • array $attrib: Tag attributes as key/value pairs
  • string $content: Optinal Tag content (creates a container tag)
  • array $allowed_attrib: List with allowed attributes, omit to allow all
Constructor __construct (line 48)

Constructor

  • access: public
html __construct ([array $attrib = array()])
  • array $attrib: Hash array with tag attributes

Redefined in descendants as:
show (line 60)

Return the tag code

  • return: The finally composed HTML tag
  • access: public
string show ()

Redefined in descendants as:

Documentation generated on Wed, 23 May 2012 16:40:46 +0200 by phpDocumentor 1.4.4