Base class for all HTML Tag classes.
Tag class renders an html tag, its attributes, the content (if any), and close tag (if needed).
Located in /HTMLTagClass.inc (line 31)
Container | --XMLTagClass | --HTMLTagClass
Class | Description |
---|---|
Atag | <A> tag class |
ABBRtag | <ABBR> tag class |
ACRONYMtag | <ACRONYM> tag class |
ADDRESStag | <ADDRESS> tag class |
APPLETtag | <APPLET> tag class |
AREAtag | <AREA> tag class |
Btag | |
BASEtag | <BASE> tag class |
BDOtag | <BDO> tag class |
BIGtag | <BIG> tag class |
BLOCKQUOTEtag | <BLOCKQUOTE> tag class |
BODYtag | <BODY> tag class |
BRtag |
tag class |
BUTTONtag | <BUTTON> tag class |
CAPTIONtag | <CAPTION> tag class This element defines a table caption. |
CENTERtag | <CENTER> tag class. |
CITEtag | <CITE> tag class |
CODEtag | |
COLtag | <COL> tag class |
COLGROUPtag | <COLGROUP> tag class |
DDtag | <DD> tag class |
DELtag | <DEL> tag class |
DFNtag | <DFN> tag class |
DIVtag | <DIV> tag class |
DLtag | <DL> tag class |
DOCTYPEtag | <!DOCTYPE> tag class |
DTtag | <DT> tag class |
EMtag | <EM> tag class |
FIELDSETtag | <FIELDSET> tag class |
FONTtag | <FONT> tag class |
FORMtag | FORMtag <FORM> tag |
FRAMEtag | <FRAME> tag class |
FRAMESETtag | <FRAMESET> tag class |
H1tag | <H1> tag class |
H2tag | <H2> tag class |
H3tag | <H3> tag class |
H4tag | <H4> tag class |
H5tag | <H5> tag class |
H6tag | <H6> tag class |
HEADtag | <HEAD> tag class |
HRtag | <HR> tag class |
HTMLtag | <HTML> tag class. |
Itag | |
IFRAMEtag | <IFRAME> tag class |
IMGtag | <IMG> tag class |
INPUTtag | INPUTtag <INPUT> tag |
INStag | <INS> tag class |
KBDtag | |
LABELtag | <LABEL> tag class |
LEGENDtag | <LEGEND> tag class |
LItag | <LI> tag class |
LINKtag | <LINK> tag class |
MAPtag | <MAP> tag class |
METAtag | <META> tag class |
NOBRtag | <NOBR> tag class |
NOFRAMEStag | <NOFRAMES> tag class |
NOSCRIPTtag | <NOSCRIPT> tag class |
OBJECTtag | <OBJECT> tag class |
OLtag | |
OPTGROUPtag | <OPTGROUP> tag class |
OPTIONtag | <OPTION> tag class |
Ptag | <P> tag class |
PARAMtag | <PARAM> tag class |
PREtag | |
Qtag | <Q> tag class |
Stag | <S> tag class |
SAMPtag | |
SCRIPTtag | <SCRIPT> tag class |
SELECTtag | <SELECT> tag class |
SMALLtag | <SMALL> tag class |
SPANtag | <SPAN> tag class |
STRONGtag | <STRONG> tag class |
STYLEtag | <STYLE> tag class |
SUBtag | <SUB> tag class |
SUPtag | <SUP> tag class |
TABLEtag | <TABLE> tag class |
TEXTAREAtag | <TEXTAREA> tag class |
THtag | Table Header <TH> class. |
TITLEtag | <TITLE> tag class |
TRtag | Table Row <TR> class. |
TTtag | <TT> tag class |
Utag | <U> tag class |
VARtag | |
XMPtag | <XMP> tag class |
Class Constructor
- function HTMLTagClass( $attributes=NULL ) {
- if ( $attributes ) {
- $this->set_tag_attributes( $attributes );
- }
- //set the default tag options
- $this->_set_flags();
- //add the content if any.
- $num_args = func_num_args();
- for ($i = 1; $i < $num_args; $i++) {
- $this->add(func_get_arg($i));
- }
- //what version of html is this tag going to
- //be rendered as?
- //this is a magic test. It assumes that
- //someone has created the define for
- //HTML_RENDER_TYPE
- if ( $GLOBALS["HTML_RENDER_TYPE"] == XHTML ||
- $GLOBALS["HTML_RENDER_TYPE"] == XHTML_STRICT ) {
- $this->_flags |= _XHTMLCOMPLIANT;
- }
- //if the tag is depricated
- //we raise an alert.
- if ( $this->_flags & _DEPRICATED ) {
- trigger_error(htmlspecialchars($this->_tag) . " has been depricated in HTML 4.0", E_USER_NOTICE);
- }
- }
Renders the tag, attributes, content and close tag.
- function render($indent_level=NULL, $output_debug=0) {
- //try and guess the indentation flags
- //based on the data
- $this->_prepare_flags();
- if ( $indent_level==NULL ) {
- $indent_level = 0;
- }
- $html = $this->_render_tag($indent_level, $output_debug);
- if ( $this->_flags & _CONTENTREQUIRED) {
- $html .= $this->_render_content($indent_level, $output_debug);
- }
- if ( $this->_flags & _CLOSETAGREQUIRED ) {
- $html .= $this->_render_close_tag($indent_level, $output_debug);
- }
- return $html;
- }
This function is a shorthand helper to setting the class attribute on a tag.
- function set_class( $value ) {
- $this->set_tag_attribute("class", $value);
- }
This function is a shorthand helper to setting the id attribute on a tag.
- function set_id( $value ) {
- $this->set_tag_attribute("id", $value);
- }
This function is a shorthand helper to setting the style attribute on a tag.
- function set_style( $value ) {
- $this->set_tag_attribute("style", $value);
- }
Inherited From XMLTagClass
XMLTagClass::XMLTagClass()
XMLTagClass::get_tag()
XMLTagClass::get_tag_attribute()
XMLTagClass::get_tag_name()
XMLTagClass::render()
XMLTagClass::reset_attributes()
XMLTagClass::set_cdata_flag()
XMLTagClass::set_collapse()
XMLTagClass::set_newline_after_closetag()
XMLTagClass::set_newline_after_opentag()
XMLTagClass::set_tag_attribute()
XMLTagClass::set_tag_attributes()
XMLTagClass::set_tag_name()
XMLTagClass::_set_flags()
Inherited From Container
Container::Container()
Container::add()
Container::add_reference()
Container::count_content()
Container::get_element()
Container::get_indent_flag()
Container::push()
Container::push_reference()
Container::render()
Container::reset_content()
Container::set_collapse()
Container::set_indent_flag()
Documentation generated on Thu, 1 Sep 2005 17:06:03 -0700 by phpDocumentor 1.3.0RC3