Moodle  2.2.1
http://www.collinsharper.com
HTML_Common Class Reference
Inheritance diagram for HTML_Common:

Public Member Functions

 HTML_Common ($attributes=null, $tabOffset=0)
 apiVersion ()
 _getLineEnd ()
 _getTab ()
 _getTabs ()
 _getAttrString ($attributes)
 _parseAttributes ($attributes)
 _getAttrKey ($attr, $attributes)
 _updateAttrArray (&$attr1, $attr2)
 _removeAttr ($attr, &$attributes)
 getAttribute ($attr)
 setAttributes ($attributes)
 getAttributes ($asString=false)
 updateAttributes ($attributes)
 removeAttribute ($attr)
 setLineEnd ($style)
 setTabOffset ($offset)
 getTabOffset ()
 setTab ($string)
 setComment ($comment)
 getComment ()
 toHtml ()
 display ()

Data Fields

 $_attributes = array()
 $_tabOffset = 0
 $_tab = "\11"
 $_lineEnd = "\12"
 $_comment = ''

Detailed Description

Base class for all HTML classes

Author:
Adam Daniel <adaniel1@eesus.jnj.com>
Version:
1.7
Since:
PHP 4.0.3pl1

Definition at line 39 of file Common.php.


Member Function Documentation

_getAttrKey ( attr,
attributes 
)

Returns the array key for the given non-name-value pair attribute

Parameters:
string$attrAttribute
array$attributesArray of attribute
Since:
1.0 private
Returns:
bool
Exceptions:

Definition at line 207 of file Common.php.

_getAttrString ( attributes)

Returns an HTML formatted attribute string

Parameters:
array$attributes
Returns:
string private

Definition at line 144 of file Common.php.

Here is the caller graph for this function:

Returns the lineEnd

Since:
1.7 private
Returns:
string
Exceptions:

Definition at line 110 of file Common.php.

_getTab ( )

Returns a string containing the unit for indenting HTML

Since:
1.7 private
Returns:
string

Definition at line 122 of file Common.php.

Here is the caller graph for this function:

_getTabs ( )

Returns a string containing the offset for the whole HTML code

Returns:
string private

Definition at line 133 of file Common.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_parseAttributes ( attributes)

Returns a valid atrributes array from either a string or array

Parameters:
mixed$attributesEither a typical HTML attribute string or an associative array private

Definition at line 161 of file Common.php.

Here is the caller graph for this function:

_removeAttr ( attr,
&$  attributes 
)

Removes the given attribute from the given array

Parameters:
string$attrAttribute name
array$attributesAttribute array
Since:
1.4 private
Returns:
void
Exceptions:

Definition at line 242 of file Common.php.

Here is the caller graph for this function:

_updateAttrArray ( &$  attr1,
attr2 
)

Updates the attributes in $attr1 with the values in $attr2 without changing the other existing attributes

Parameters:
array$attr1Original attributes array
array$attr2New attributes array private

Definition at line 222 of file Common.php.

Here is the caller graph for this function:

Returns the current API version public

Returns:
double

Reimplemented in HTML_QuickForm, HTML_QuickForm_element, and HTML_QuickForm_select.

Definition at line 97 of file Common.php.

display ( )

Displays the HTML to the screen

public

Reimplemented in HTML_QuickForm_DHTMLRulesTableless.

Definition at line 422 of file Common.php.

Here is the call graph for this function:

getAttribute ( attr)

Returns the value of the given attribute

Parameters:
string$attrAttribute name
Since:
1.5 public
Returns:
void
Exceptions:

Definition at line 259 of file Common.php.

Here is the caller graph for this function:

getAttributes ( asString = false)

Returns the assoc array (default) or string of attributes

Parameters:
boolWhether to return the attributes as string
Since:
1.6 public
Returns:
mixed attributes

Definition at line 286 of file Common.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the HTML comment

Since:
1.5 public
Returns:
string

Definition at line 400 of file Common.php.

Here is the caller graph for this function:

Returns the tabOffset

Since:
1.5 public
Returns:
int

Definition at line 362 of file Common.php.

HTML_Common ( attributes = null,
tabOffset = 0 
)

Class constructor

Parameters:
mixed$attributesAssociative array of table tag attributes or HTML attributes name="value" pairs
int$tabOffsetIndent offset in tabs public

Definition at line 86 of file Common.php.

Here is the call graph for this function:

Here is the caller graph for this function:

removeAttribute ( attr)

Removes an attribute

Parameters:
string$attrAttribute name
Since:
1.4 public
Returns:
void
Exceptions:

Definition at line 314 of file Common.php.

Here is the call graph for this function:

Here is the caller graph for this function:

setAttributes ( attributes)

Sets the HTML attributes

Parameters:
mixed$attributesEither a typical HTML attribute string or an associative array public

Definition at line 273 of file Common.php.

Here is the call graph for this function:

Here is the caller graph for this function:

setComment ( comment)

Sets the HTML comment to be displayed at the beginning of the HTML string

Parameters:
string
Since:
1.4 public
Returns:
void

Definition at line 388 of file Common.php.

setLineEnd ( style)

Sets the line end style to Windows, Mac, Unix or a custom string.

Parameters:
string$style"win", "mac", "unix" or custom string.
Since:
1.7 public
Returns:
void

Definition at line 327 of file Common.php.

setTab ( string)

Sets the string used to indent HTML

Since:
1.7
Parameters:
string$stringString used to indent ("\11", "\t", ' ', etc.). public
Returns:
void

Definition at line 375 of file Common.php.

setTabOffset ( offset)

Sets the tab offset

Parameters:
int$offsetpublic

Definition at line 350 of file Common.php.

Here is the caller graph for this function:

updateAttributes ( attributes)

Updates the passed attributes without changing the other existing attributes

Parameters:
mixed$attributesEither a typical HTML attribute string or an associative array public

Definition at line 300 of file Common.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$_attributes = array()

Definition at line 46 of file Common.php.

$_comment = ''

Definition at line 77 of file Common.php.

$_lineEnd = "\12"

Definition at line 69 of file Common.php.

$_tab = "\11"

Definition at line 61 of file Common.php.

$_tabOffset = 0

Definition at line 53 of file Common.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations