Class html

Description

Class for HTML code creation

Located in /lib/Roundcube/html.php (line 26)


	
			
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 ([ $attrib = array()])
 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 array parse_attrib_string (string $str)
 static string quote (string $str)
 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 35)
  • access: public
static mixed $containers = array('iframe','div','span','p','h1','h2','h3','form','textarea','table','thead','tbody','tr','th','td','style','script') (line 36)
  • access: public
static mixed $doctype = 'xhtml' (line 33)
  • access: public
static mixed $lc_tags = true (line 34)
  • access: public
mixed $allowed = array() (line 30)
  • access: protected

Redefined in descendants as:
mixed $attrib = array() (line 29)
  • access: protected
mixed $content (line 31)
  • access: protected
mixed $tagname (line 28)
  • access: protected

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

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 266)

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 254)

Derrived method for line breaks

string br ([ $attrib = array()])
  • $attrib
static div (line 119)

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 94)
  • access: public
void doctype ( $type)
  • $type
static iframe (line 215)

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 150)

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 200)

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 135)

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 parse_attrib_string (line 310)

Convert a HTML attribute string attributes to an associative array (name => value)

  • return: Key-value pairs of parsed attributes
  • access: public
array parse_attrib_string (string $str)
  • string $str: Input string
static quote (line 334)

Replacing specials characters in html attribute value

  • return: The quoted string
  • access: public
string quote (string $str)
  • string $str: Input string
static script (line 232)

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 184)

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 72)

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 44)

Constructor

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

Redefined in descendants as:
show (line 56)

Return the tag code

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

Redefined in descendants as:

Documentation generated on Fri, 03 May 2013 12:44:54 +0200 by phpDocumentor 1.4.4