dokeos
[ class tree: dokeos ] [ index: dokeos ] [ all elements ]

Class: HTML_Common

Source Location: /main/inc/lib/pear/HTML/Common.php

Class Overview


Base class for all HTML classes


Author(s):

Version:

  • 1.7

Variables

Methods


Child classes:

HTML_QuickForm_element
Base class for form elements
HTML_Table
PEAR::HTML_Table makes the design of HTML tables easy, flexible, reusable and efficient.
HTML_Table_Storage
Storage class for HTML::Table data
HTML_QuickForm
Create, validate and process HTML forms

Class Details

[line 29]
Base class for all HTML classes



Tags:

author:  Adam Daniel <adaniel1@eesus.jnj.com>
version:  1.7
abstract:  
since:  PHP 4.0.3pl1


[ Top ]


Class Variables

$_attributes = array()

[line 36]

Associative array of table attributes



Tags:

access:  private

Type:   array


[ Top ]

$_comment =  ''

[line 67]

HTML comment on the object



Tags:

since:  1.5
access:  private

Type:   string


[ Top ]

$_lineEnd =  "\12"

[line 59]

Contains the line end string



Tags:

since:  1.7
access:  private

Type:   string


[ Top ]

$_tab =  "\11"

[line 51]

Tab string



Tags:

since:  1.7
access:  private

Type:   string


[ Top ]

$_tabOffset =  0

[line 43]

Tab offset of the table



Tags:

access:  private

Type:   int


[ Top ]



Class Methods


constructor HTML_Common [line 76]

HTML_Common HTML_Common( [mixed $attributes = null], [int $tabOffset = 0])

Class constructor



Tags:

access:  public


Parameters:

mixed   $attributes   Associative array of table tag attributes or HTML attributes name="value" pairs
int   $tabOffset   Indent offset in tabs

[ Top ]

method apiVersion [line 87]

double apiVersion( )

Returns the current API version



Tags:

access:  public


Overridden in child classes as:

HTML_QuickForm_element::apiVersion()
Returns the current API version
HTML_QuickForm_select::apiVersion()
Returns the current API version
HTML_Table::apiVersion()
Returns the API version
HTML_QuickForm::apiVersion()
Returns the current API version

[ Top ]

method display [line 413]

void display( )

Displays the HTML to the screen



Tags:

access:  public


Overridden in child classes as:

SortableTable::display()
Displays the table, complete with navigation buttons to browse through the data-pages.
FormValidator::display()
Display the form.
CatForm::display()
DataForm::display()
UserForm::display()
EvalForm::display()

[ Top ]

method getAttribute [line 250]

void getAttribute( string $attr)

Returns the value of the given attribute



Tags:

since:  1.5
throws:  
access:  public


Parameters:

string   $attr   Attribute name

[ Top ]

method getAttributes [line 277]

mixed getAttributes( [bool $asString = false])

Returns the assoc array (default) or string of attributes



Tags:

return:  attributes
since:  1.6
access:  public


Parameters:

bool   $asString   Whether to return the attributes as string

[ Top ]

method getComment [line 391]

string getComment( )

Returns the HTML comment



Tags:

since:  1.5
access:  public


[ Top ]

method getTabOffset [line 353]

int getTabOffset( )

Returns the tabOffset



Tags:

since:  1.5
access:  public


[ Top ]

method removeAttribute [line 305]

void removeAttribute( string $attr)

Removes an attribute



Tags:

since:  1.4
throws:  
access:  public


Parameters:

string   $attr   Attribute name

[ Top ]

method setAttributes [line 264]

void setAttributes( mixed $attributes)

Sets the HTML attributes



Tags:

access:  public


Parameters:

mixed   $attributes   Either a typical HTML attribute string or an associative array

[ Top ]

method setComment [line 379]

void setComment( string $comment)

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



Tags:

since:  1.4
access:  public


Parameters:

string   $comment  

[ Top ]

method setLineEnd [line 318]

void setLineEnd( string $style)

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



Tags:

since:  1.7
access:  public


Parameters:

string   $style   "win", "mac", "unix" or custom string.

[ Top ]

method setTab [line 366]

void setTab( string $string)

Sets the string used to indent HTML



Tags:

since:  1.7
access:  public


Parameters:

string   $string   String used to indent ("\11", "\t", ' ', etc.).

[ Top ]

method setTabOffset [line 341]

void setTabOffset( int $offset)

Sets the tab offset



Tags:

access:  public


Parameters:

int   $offset  

[ Top ]

method toHtml [line 403]

string toHtml( )

Abstract method. Must be extended to return the objects HTML



Tags:

abstract:  
access:  public


Overridden in child classes as:

HTML_QuickForm_xbutton::toHtml()
HTML_QuickForm_group::toHtml()
Returns Html for the group
HTML_QuickForm_hierselect::toHtml()
HTML_QuickForm_date::toHtml()
HTML_QuickForm_datepicker::toHtml()
HTML code to display this datepicker
HTML_QuickForm_datepickerdate::toHtml()
HTML code to display this datepicker
HTML_QuickForm_receivers::toHtml()
HTML representation
HTML_QuickForm_textarea::toHtml()
Returns the textarea element in HTML
HTML_QuickForm_html_editor::toHtml()
Return the HTML editor in HTML
HTML_QuickForm_input::toHtml()
Returns the input field in HTML
HTML_QuickForm_radio::toHtml()
Returns the radio element in HTML
HTML_QuickForm_autocomplete::toHtml()
Returns Html for the autocomplete input text element
HTML_QuickForm_checkbox::toHtml()
Returns the checkbox element in HTML
HTML_QuickForm_advcheckbox::toHtml()
Returns the checkbox element in HTML and the additional hidden element in HTML
HTML_QuickForm_select::toHtml()
Returns the SELECT in HTML
HTML_QuickForm_hiddenselect::toHtml()
Returns the SELECT in HTML
HTML_QuickForm_advmultiselect::toHtml()
Returns the HTML generated for the advanced mutliple select component
HTML_QuickForm_static::toHtml()
Returns the static text element in HTML
HTML_QuickForm_link::toHtml()
Returns the textarea element in HTML
HTML_Table::toHtml()
Returns the table structure as HTML
HTML_Table_Storage::toHtml()
Returns the table rows as HTML
HTML_QuickForm::toHtml()
Returns an HTML version of the form

[ Top ]

method updateAttributes [line 291]

void updateAttributes( mixed $attributes)

Updates the passed attributes without changing the other existing attributes



Tags:

access:  public


Parameters:

mixed   $attributes   Either a typical HTML attribute string or an associative array

[ Top ]

method _getAttrKey [line 197]

array _getAttrKey( string $attr, array $attributes)

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



Tags:

return:  key
since:  1.0
throws:  
access:  private


Parameters:

string   $attr   Attribute
array   $attributes   Array of attribute

[ Top ]

method _getAttrString [line 134]

string _getAttrString( array $attributes)

Returns an HTML formatted attribute string



Tags:

access:  private


Parameters:

array   $attributes  

[ Top ]

method _getLineEnd [line 100]

string _getLineEnd( )

Returns the lineEnd



Tags:

since:  1.7
throws:  
access:  private


[ Top ]

method _getTab [line 112]

string _getTab( )

Returns a string containing the unit for indenting HTML



Tags:

since:  1.7
access:  private


[ Top ]

method _getTabs [line 123]

string _getTabs( )

Returns a string containing the offset for the whole HTML code



Tags:

access:  private


[ Top ]

method _parseAttributes [line 151]

void _parseAttributes( mixed $attributes)

Returns a valid atrributes array from either a string or array



Tags:

access:  private


Parameters:

mixed   $attributes   Either a typical HTML attribute string or an associative array

[ Top ]

method _removeAttr [line 233]

void _removeAttr( string $attr, &$attributes, array $attributes)

Removes the given attribute from the given array



Tags:

since:  1.4
throws:  
access:  public


Parameters:

string   $attr   Attribute name
array   $attributes   Attribute array
   &$attributes  

[ Top ]

method _updateAttrArray [line 213]

array _updateAttrArray( &$attr1, array $attr2, array $attr1)

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



Tags:

access:  private


Parameters:

array   $attr1   Original attributes array
array   $attr2   New attributes array
   &$attr1  

[ Top ]


Documentation generated on Thu, 12 Jun 2008 13:08:12 -0500 by phpDocumentor 1.4.1