Class HTMLPageClass

Description

class the constructs and renders an entire HTML/XHTML document.

Located in Program_Root/widgets/HTMLPageClass.inc (line 26)


	
			
Direct descendents
Class Description
PageWidget This class is used to build content for an entire page. It uses the HTMLPageClass widget from phphtmllib to render the final output.
HTMLRedirectPage This builds an entire HTML Page with the sole purpose of doing a redirect to another url.
Variable Summary
Method Summary
void HTMLPageClass ([mixed $title = NULL], [string $html_type = HTML], [int $indent_style = INDENT_NICE])
void add (mixed 0)
void add_css_link (mixed $link)
void add_head_content (mixed 0)
void add_head_css (string $css)
void add_head_js (mixed $content)
void add_js_link (mixed $link)
void add_reference (mixed &$content)
void build_doctype (string $link1, [string $link2 = NULL])
array(); get_html_attributes ()
void push ()
void push_css_link (mixed $link)
void push_head_js (mixed $content)
void push_js_link (mixed $link)
void push_reference (mixed &$content)
string render ()
void set_body_attributes (array $attributes)
void set_charset (string $charset)
void set_encoding (string $encoding)
void set_frameset (FRAMESETtag $frameset)
void set_html_attributes (array $attributes)
void set_language (string $language)
void set_refresh (int $time, [string $url = NULL])
void set_text_debug ($flag $flag)
void set_title (mixed $title)
void _build_head ()
void _create_body ()
Variables
array $_html_attributes = array() (line 149)

This holds the attributes for the <html> tag.

int $_indent_style = 0 (line 175)

Holds the value of the indent style the user wants to render the page w/

array $_widget_css_auto = array() (line 157)

keeps track of which widgets we have automatically pulled in css for

array $_widget_js_auto = array() (line 165)

keeps track of which widgets we have automatically pulled in js for

mixed $_xml_encoding = "UTF-8" (line 93)

The encoding of the XHTML

XML tag

Methods
Constructor HTMLPageClass (line 203)

Class Constructor

  • access: public
void HTMLPageClass ([mixed $title = NULL], [string $html_type = HTML], [int $indent_style = INDENT_NICE])
  • mixed $title:

    - $title Title string or TITLEtag object for the page.

  • string $html_type:

    - one of 3 types of html to render. Setting this will make the object declare the gobal define which tells all of the tag objects what type of html tags to render. some tags support special features. such as the <IMG> tag. If xhtml is selected, the the IMGtag object and all utility functions will not render "border=0" as a default attribute, since this is not proper xhtml. "html" - HTML 4.0 (default) "xhtml_transitional" - render xhtml instead of html

    • doctype is XHTML transitional.
    "xhtml_strict" - render xhtml instead of html 4.0.
    • doctype is XHTML strict.

  • int $indent_style:

    - one of 2 types. INDENT_NICE or INDENT_LEFT_JUSTIFY This tells the page how to render the indenting of the output. By default it is set to INDENT_NICE, which nicely indents each nested tag. You can have all tags rendered left justified (smaller size in output) by using INDENT_LEFT_JUSTIFY

add (line 479)

This function adds content to the <body> area of the page.

void add (mixed 0)
  • mixed 0:

    - any # of parameters

add_css_link (line 333)

pushes a css external reference to the head area

void add_css_link (mixed $link)
  • mixed $link:

    - link tag object or $url for a css.

add_head_content (line 262)

this adds content to the head tag of the page

void add_head_content (mixed 0)
  • mixed 0:

    - any content to add

add_head_css (line 306)

this function adds raw css to the <head> tag. It will automatically be wrapped in a <style type="text/css">

void add_head_css (string $css)
  • string $css:

    - the raw css

add_head_js (line 286)

adds raw javascript to the head which will automatically get wrapped in a <script language="JavaScript"> tag.

void add_head_js (mixed $content)
  • mixed $content:

    - raw javascript code to add to the head

add_js_link (line 358)

This adds a link to an external Javascript file, which will get rendered in the head.

void add_js_link (mixed $link)
  • mixed $link:

    - script tag object or $url of .js file.

add_reference (line 516)

Adds the content reference to the <body> tag for later use.

void add_reference (mixed &$content)
  • mixed $content:

    - content to add

build_doctype (line 565)

This function is used to build the DOCTYPE

tag for the page. It will automatically create a DOCTYPE with a document_element of "html" and a source of "PUBLIC"

void build_doctype (string $link1, [string $link2 = NULL])
  • string $link1:

    - link1

  • string $link2:

    - link2

get_html_attributes (line 442)

This function returns the attributes to be used for the <html> tag.

array(); get_html_attributes ()
push (line 505)

Same as add()

  • deprecated:

    - use add()

void push ()
push_css_link (line 347)

Same ass add_css_link()

  • deprecated:

    - use add_css_link();

void push_css_link (mixed $link)
push_head_content (line 274)

Same ass add_head_content()

  • deprecated:

    - use add_head_content();

void push_head_content ()
push_head_js (line 295)

Same ass add_head_js()

  • deprecated:

    - use add_head_js();

void push_head_js (mixed $content)
push_js_link (line 372)

same as add_js_link()

  • deprecated:
void push_js_link (mixed $link)
push_reference (line 526)

Same as add()

  • deprecated:

    - use add()

void push_reference (mixed &$content)
render (line 638)

render the page.

  • return:

    the raw html output.

string render ()

Redefined in descendants as:
set_body_attributes (line 549)

set attributes of body tag

void set_body_attributes (array $attributes)
  • array $attributes:

    the name=>value pairs

set_charset (line 393)

set the character set

void set_charset (string $charset)
  • string $charset:

    - the charset for the meta tag

set_encoding (line 403)

This sets the encoding type for XHTML documents

void set_encoding (string $encoding)
  • string $encoding:

    - the encoding parameter

set_frameset (line 426)

This function is used to set the FRAMSETtag object for this page. This automatically sets the output for this page object to be a frameset.

void set_frameset (FRAMESETtag $frameset)
set_html_attributes (line 454)

This function sets the attributes for the <html> tag

void set_html_attributes (array $attributes)
  • array $attributes:

    - the name=>value pair for the attributes

set_language (line 413)

This method sets the lang, and xml:lang setting in the HTML tag.

void set_language (string $language)
  • string $language:

    - the language

set_refresh (line 381)

Automatically set a page meta tag refresh

void set_refresh (int $time, [string $url = NULL])
  • int $time:

    - time in seconds to refresh

  • string $url:

    - the url to go to.

set_text_debug (line 577)

set the $_text_debug flag

void set_text_debug ($flag $flag)
  • $flag $flag:

    - boolean.

set_title (line 316)

set the title of the page output.

void set_title (mixed $title)
  • mixed $title:

    - the title of the html page can be TITLEtag object.

_build_content_type_tag (line 463)

this builds the content type meta tag.

void _build_content_type_tag ()
_build_head (line 590)

builds the head object and its content.

void _build_head ()
_create_body (line 537)

This is responsible for creating the BODYtag object. We only will create a new $this->_body if it doesn't already exist.

void _create_body ()
_frameset_wrap_body (line 624)

This builds a frameset body tag wrapped in a <noframes> tag.

  • return:

    object.

NOFRAMEStag _frameset_wrap_body ()

Documention generated on Thu, 31 Jul 2003 18:32:48 -0700 by phpDocumentor 1.2.0