Class Container

Description

This class is nothing more then a

container widget. It lets you push data into it, and it will render each item indented properly so it works with the rest of the libs.

This is helpfull when you have a function that wants to return multiple Tag Objects or widgets. Just wrap them in this container and they will all get rendered with the current indentation level.

Base Class for phpHtmlLib

Located in Program_Root/ContainerClass.inc (line 38)


	
			
Direct descendents
Class Description
XMLTagClass This class is used for building and rendering an XML tag.
BaseWidget this is the base widget class, that all widgets are based off of. It provides some basic members and methods
ContainerWidget This is just to maintain compatibility with the 1.1.0 release of phphtmllib
XMLDocumentClass This class lets you build a complete xml document and render it.
FormProcessor This is the main engine for the processing
Variable Summary
mixed $_flags
Method Summary
void Container ()
void add (mixed $content)
void add_reference (mixed &$content)
int count_content ()
boolean get_indent_flag ()
void push (mixed $content)
void push_reference (mixed &$content)
string render (int $indent_level, int $output_debug)
void reset_content (mixed $content)
void set_collapse ([boolean $collapse = TRUE], [boolean $indent = TRUE])
void set_indent_flag (boolean $flag)
void _set_flags ()
Variables
mixed $_flags = _NEWLINEAFTERCONTENT (line 64)

The flags that tell us

how to render the tag its contents, and the close

Methods
Constructor Container (line 76)

The constructor.

This lets you pass in data that you want automatically added to the container. This works in the same manner as the push() method.

void Container ()
add (line 172)

add content onto content stack

adds content to tag as a FIFO. You can have n number of parameters. each one will get added in succession to the content.

  • access: public
void add (mixed $content)
  • mixed $content:

    - either string, or tag object.


Redefined in descendants as:
add_reference (line 214)

Add content onto content stack so you can change the item later.

adds content to tag as a FIFO You can only add 1 element at a time, and it will be added as a reference. So you can't do push_reference("something");, since "something" is a static.

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

    - either string, or tag object. the tag object gets stored as a reference to the original, so you can push it, then modify it later.


Redefined in descendants as:
count_content (line 239)

counts the number of content objects

  • access: public
int count_content ()
get_indent_flag (line 280)

This flag gets the current value of the indent flag

  • access: public
boolean get_indent_flag ()
push (line 158)

Same as add().

NOTE: only exists for 1.1.x compatibility

  • access: public
  • deprecated:
void push (mixed $content)
  • mixed $content:

    - either string, or tag object.


Redefined in descendants as:
push_reference (line 193)

Same as add_reference NOTE : only exists for compatibility with 1.1.x

  • access: public
void push_reference (mixed &$content)
  • mixed &$content:

    - a reference to some variable.


Redefined in descendants as:
render (line 106)

This function is compatible with the rest of the phpHtmllib API spec.

It just walks through each of the class' data and renders it with the appropriate indentation.

  • return:

    the raw html output.

string render (int $indent_level, int $output_debug)
  • int $indent_level:

    - the indentation level for the container.

  • int $output_debug:

    - the output debug flag to maintain compatibility w/ the API.


Redefined in descendants as:
reset_content (line 226)

destroy existing content and start with new content.

  • access: public
void reset_content (mixed $content)
  • mixed $content:

    can be tag object, or raw (string).


Redefined in descendants as:
set_collapse (line 294)

This function turns on the collapse flag

  • access: public
void set_collapse ([boolean $collapse = TRUE], [boolean $indent = TRUE])
  • boolean $collapse:

    - the collapse flag

  • boolean $indent:

    - the indent flag DEFAULT: TRUE;


Redefined in descendants as:
set_indent_flag (line 263)

function to set the indent flag

  • access: public
void set_indent_flag (boolean $flag)
  • boolean $flag:

    TRUE or FALSE

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