Claro_Html_Element Class Reference

Inheritance diagram for Claro_Html_Element:
Claro_Renderer Claro_Html_Container Claro_Utils_Datagrid Claro_Utils_Autogrid Claro_Utils_Clarogrid

Public Member Functions

 __construct ($name, $attributes=null, $autoClose=false)
 __destruct ()
 setContent ($content)
 render ()
 getId ()
 getAttr ($name)
 setAttr ($name, $value)

Protected Member Functions

 formatAttributes ($attributes)

Protected Attributes

 $autoClose
 $name
 $attributes
 $content

Static Protected Attributes

static $ids = array()

Detailed Description

Generic HTML Element class

Definition at line 31 of file html.lib.php.


Constructor & Destructor Documentation

__construct ( name,
attributes = null,
autoClose = false 
)
Parameters:
string $name html element name ('input', 'p'...)
array $attributes associative array of attributes
bool $autoClose set to true for an autoclosed element (<input />, <img />...), default false

Definition at line 46 of file html.lib.php.

__destruct (  ) 

Definition at line 71 of file html.lib.php.


Member Function Documentation

formatAttributes ( attributes  )  [protected]

Format attributes

Parameters:
array $attributes associative array of attributes
Returns:
string formated attributes

Definition at line 118 of file html.lib.php.

getAttr ( name  ) 

Return the value of the given attribute

Parameters:
string $name attribute name
Returns:
string attribute value or null if not defined

Definition at line 161 of file html.lib.php.

getId (  ) 

Get element id

Returns:
string id

Definition at line 144 of file html.lib.php.

render (  ) 
See also:
Claro_Renderer

Implements Claro_Renderer.

Reimplemented in Claro_Utils_Datagrid, and Claro_Html_Container.

Definition at line 101 of file html.lib.php.

setAttr ( name,
value 
)

Set or modify the value of the given attribute

Parameters:
string $name attribute name
string $value attribute value

Definition at line 178 of file html.lib.php.

setContent ( content  ) 

Set the element content

Parameters:
string $content

Definition at line 93 of file html.lib.php.


Field Documentation

$attributes [protected]

Definition at line 37 of file html.lib.php.

$autoClose [protected]

Definition at line 35 of file html.lib.php.

$content [protected]

Definition at line 38 of file html.lib.php.

$ids = array() [static, protected]

Definition at line 33 of file html.lib.php.

$name [protected]

Definition at line 36 of file html.lib.php.


The documentation for this class was generated from the following file:
Generated on Tue Jun 8 12:28:38 2010 for Claroline API by  doxygen 1.6.3