new HTML_Template_Flexy_Element

new HTML_Template_Flexy_Element -- Class constructor

Synopsis

require_once 'HTML/Template/Flexy/Element.php';

new HTML_Template_Flexy_Element ([string $tag = '' [, array $attributes = NULL]])

ïÐÉÓÁÎÉÅ

Flexy uses a single lightweight class to represent All HTML Tags, All the variables of the class are public, and you are encouraged to use them. And the methods provide generic assignment and conversion abilities.

To force th toHtml() method to generate XHTML, rather than standard HTML, use $element->setAttribute('flexy:xhtml','yes'); or add flexy:xhtml="true" to the attribute of the element in the template.

ðÁÒÁÍÅÔÒ

Public Properties

string $element->tag

The name of the html element eg. img for <img...

array $element->attributes

Attributes for the element

array $element->children

All the sub elements inside this, can be any object that implements toHtml(), or a string.

string $element->override

this value of thiswill be output when toHtml() is called, rather than the tags.

string|object $element->prefix

string or object that implements toHtml() method, and is returned by toHtml() before the tag HTML

string|object $element->suffix

string or object that implements toHtml() method, and is returned by toHtml() after the tag HTML

mixed $element->value

when you create an element, that is to be merged later with a full definition, you can assign the value here, and during toHtml(), the toValue() method will be called and select options, checkboxes and input values will be correctly filled in.

Throws

throws no exceptions thrown

úÁÍÅÔËÁ

üÔÁ ÆÕÎËÃÉÑ ÎÅ ÄÏÌÖÎÁ ×ÙÚÙ×ÁÔØÓÑ ÓÔÁÔÉÞÅÓËÉ.

ðÒÉÍÅÒ


HIVE: All information for read only. Please respect copyright!
Hosted by hive ÊÃÁ: Êèåâñêàÿ ãîðîäñêàÿ áèáëèîòåêà