Class n2f_template

Description

Core template class for N2 Framework Yverdon.

Located in /system/classes/template.cls.php (line 23)

n2f_events
   |
   --n2f_template
Variable Summary
string $base
string $expire
string $extension
array $fields
string $file
string $module
string $skin
Method Summary
static null addExtension (string $name,  $callbacks)
n2f_template addData (mixed $key, mixed $data)
mixed fetch ()
mixed getData (mixed $key)
n2f_template setBase (string $base)
n2f_template setExpire (integer $expire)
n2f_template setField (string $fieldname, string $fieldvalue)
n2f_template setFields ( $fields)
n2f_template setFile (string $file)
n2f_template setModule (string $module)
n2f_template setSkin (string $skin)
Variables
string $base (line 41)

Base path to look in for modules

  • access: public
string $expire (line 53)

Value for the expire header (useful to prevent unwanted caching in the browser)

  • access: public
string $extension (line 65)

Name of the extension currently in use by this n2f_template object.

  • access: protected
array $fields (line 59)

Fields which will be replaced (filled in with data) when the template file is rendered.

  • access: protected
string $file (line 35)

Name of the template file (note: file extension is up to the template engine)

  • access: public
string $module (line 47)

Name of the module to look in for the template

  • access: public
string $skin (line 29)

Name of the skin directory to look in for the template file

  • access: public
array $_internalData (line 71)

Internal container for object data.

  • access: protected

Inherited Variables

Inherited from n2f_events

n2f_events::$events
Methods
static method addExtension (line 80)

Static function for adding template extensions to the available list.

  • access: public
static null addExtension (string $name,  $callbacks)
  • string $name: Name of the extension being added
  • array $callbacks: Array of callbacks associated with the extension
Constructor __construct (line 106)

Initializes a new n2f_template object.

  • access: public
n2f_template __construct ()

Redefinition of:
n2f_events::__construct()
Initializes the n2f_events object.
addData (line 202)

Mechanism for storing data in the n2f_template object's internal data container.

  • access: public
n2f_template addData (mixed $key, mixed $data)
  • mixed $key: Key for data being stored
  • mixed $data: Actual data being stored
fetch (line 386)

Fetch the rendered data from the template.

  • access: public
mixed fetch ()
getData (line 214)

Retrieves data from the n2f_template object's internal data container.

  • access: public
mixed getData (mixed $key)
  • mixed $key: Key of data being retrieved
render (line 368)

Prepare the template for display.

  • access: public
n2f_template render ()
setBase (line 228)

Sets the base directory where templates are located.

  • access: public
n2f_template setBase (string $base)
  • string $base: The base directory for locating templates
setExpire (line 350)

Set the expiration time (in seconds) for the template.

  • access: public
n2f_template setExpire (integer $expire)
  • integer $expire: Time until template cache expires (if applicable)
setField (line 305)

Set a Field in the template

  • access: public
n2f_template setField (string $fieldname, string $fieldvalue)
  • string $fieldname: Name of the field being set
  • string $fieldvalue: Value of the field being set
setFields (line 327)

Set Fields in the template - note: $fields needs to be an associative array of key=>value pairs

  • access: public
n2f_template setFields ( $fields)
  • string $fields: Array of fields being set in the template
setFile (line 285)

Set the filename (without extension) of the template the system will use.

  • access: public
n2f_template setFile (string $file)
  • string $file: Name of the template file (without extension)
setModule (line 247)

Set the name of the module the system is looking for templates within.

  • access: public
n2f_template setModule (string $module)
  • string $module: The name of the module where the templates reside
setSkin (line 266)

Set the name of the skin the system should look for templates within.

  • access: public
n2f_template setSkin (string $skin)
  • string $skin: Name of the skin where the templates reside

Inherited Methods

Inherited From n2f_events

n2f_events::__construct()
n2f_events::addEvent()
n2f_events::hitEvent()
n2f_events::hookEvent()

Documentation generated on Sat, 23 Jan 2010 11:13:49 -0500 by phpDocumentor 1.4.1