section Class Reference

Inheritance diagram for section:

template iSection iTemplate

List of all members.

Public Member Functions

 __construct ($encoding='pass')
 read ()
 fetch ($section=false)
 assign_section ($csection)
 section_assign ($csection)
 get_content ()
 display ()
 __destruct ()

Protected Attributes

 $sections = null

Private Member Functions

 _parse_sections ()
 _sreplace ()


Constructor & Destructor Documentation

section::__construct ( encoding = 'pass'  ) 

constructor

Example:

require_once 'class_template.php';
require_once 'class_section.php';
$tpl = new section();
$tpl->dir = 'templates/';
$tpl->html = 'default.html';
$tpl->read();

Parameters:
string $encoding could be iso-8859-1, utf-8, etc.. public

Reimplemented from template.

section::__destruct (  ) 

destructor

Will flush and close the output_buffer

public

Reimplemented from template.


Member Function Documentation

section::read (  ) 

read

Will read in the templeate file
Calls the parent's constructor and read methode to get all needed data.
When done parse for sections.

See also:
template:$html

template:$dir public

Implements iSection.

section::_parse_sections (  )  [private]

_parse_sections

Will parse the template to find sections within html comments

See also:
read() private

section::fetch ( section = false  ) 

fetch

Example:

$var = $tpl->fetch('SectionName');

Will return the content of the given section
Will die if no section was passed or the section do not exist.

Parameters:
string $section The section's name
Returns:
string section content public

Implements iSection.

section::_sreplace (  )  [private]

_sreplace

Will replace all assigned placeholders with the value in the current section.

private

section::assign_section ( csection  ) 

assign_section

Will assign a section.
Will die if there is no such section.
Calls the parent's .display methode

This will echo out the section given
so do not call this if you simply wish
to fetch a section.

Example:

$tpl->assign_section('SectionName'); \

Parameters:
string $section The section's name
See also:
fetch() public

Implements iSection.

section::section_assign ( csection  ) 

section_assign

wrapper to assign_section

See also:
assign_section public

Implements iSection.

section::get_content (  ) 

get_content

Will return the content of all assigned sections and clean the buffer.
Calling display after this methode will result in a empty screen

Returns:
string Processed template content
See also:
fetch()

display() public

Implements iSection.

section::display (  ) 

display

Will flush the output buffer.
The template's content will
be send to the browser

See also:
fetch()

display() public

Implements iSection.


Member Data Documentation

section::$sections = null [protected]


The documentation for this class was generated from the following file:
Generated on Thu Nov 27 17:05:26 2008 for SKOR by  doxygen 1.5.3