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

Class: HTML_Common

Source Location: /pear/HTML/Common.php

Class Overview


Base class for all HTML classes


Author(s):

Version:

  • 1.7

Methods


Child classes:

HTML_QuickForm_element
Base class for form elements
HTML_QuickForm
Create, validate and process HTML forms

Class Details

[line 39]
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 Methods


static method charset [line 460]

static string charset( [string $newCharset = null])

Sets the charset to use by htmlspecialchars() function

Since this parameter is expected to be global, the function is designed to be called statically:

  1.  HTML_Common::charset('utf-8');
or
  1.  $charset HTML_Common::charset();




Tags:

return:  Current charset
access:  public


Parameters:

string   $newCharset   New charset to use. Omit if just getting the current value. Consult the htmlspecialchars() docs for a list of supported character sets.

[ Top ]

constructor HTML_Common [line 86]

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 97]

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_QuickForm::apiVersion()
Returns the current API version

[ Top ]

method display [line 435]

void display( )

Displays the HTML to the screen



Tags:

access:  public


[ Top ]

method getAttribute [line 257]

string|null getAttribute( string $attr)

Returns the value of the given attribute



Tags:

return:  returns null if an attribute does not exist
since:  1.5
access:  public


Parameters:

string   $attr   Attribute name

[ Top ]

method getAttributes [line 300]

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 413]

string getComment( )

Returns the HTML comment



Tags:

since:  1.5
access:  public


[ Top ]

method getTabOffset [line 375]

int getTabOffset( )

Returns the tabOffset



Tags:

since:  1.5
access:  public


[ Top ]

method removeAttribute [line 327]

void removeAttribute( string $attr)

Removes an attribute



Tags:

since:  1.4
access:  public


Parameters:

string   $attr   Attribute name

[ Top ]

method setAttribute [line 273]

void setAttribute( string $name, [string $value = null])

Sets the value of the attribute



Tags:

access:  public


Parameters:

string   $name   Attribute name
string   $value   Attribute value (will be set to $name if omitted)

[ Top ]

method setAttributes [line 287]

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 401]

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 340]

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 388]

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 363]

void setTabOffset( int $offset)

Sets the tab offset



Tags:

access:  public


Parameters:

int   $offset  

[ Top ]

method toHtml [line 425]

string toHtml( )

Abstract method. Must be extended to return the objects HTML



Tags:

abstract:  
access:  public


Overridden in child classes as:

HTML_QuickForm_group::toHtml()
Returns Html for the group
HTML_QuickForm_date::toHtml()
HTML_QuickForm_hierselect::toHtml()
HTML_QuickForm_input::toHtml()
Returns the input field in HTML
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_radio::toHtml()
Returns the radio element in HTML
HTML_QuickForm_autocomplete::toHtml()
Returns Html for the autocomplete input text element
HTML_QuickForm_select::toHtml()
Returns the SELECT in HTML
HTML_QuickForm_hiddenselect::toHtml()
Returns the SELECT in HTML
HTML_QuickForm_static::toHtml()
Returns the static text element in HTML
HTML_QuickForm_link::toHtml()
Returns the textarea element in HTML
HTML_QuickForm_textarea::toHtml()
Returns the textarea element in HTML
HTML_QuickForm_xbutton::toHtml()
HTML_QuickForm::toHtml()
Returns an HTML version of the form

[ Top ]

method updateAttributes [line 314]

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 ]


Documentation generated on Sun, 08 Jan 2012 17:51:44 +0100 by phpDocumentor 1.4.3