Class: Template

Source Location: /class_template.php

Class Overview [line 13]


Template methods.

Author(s):

  • Elpidio Latorilla

Version:

  • beta 1.0.08

Copyright:

  • 2002,2003,2004 Elpidio Latorilla

Variables

Methods


Inherited Variables

Inherited Methods



Class Details

Template methods.

Note this class should be instantiated only after a "$db" adodb connector object has been established by an adodb instance.

Tags:

[ Top ]


Class Variables

$default_path = 'gui/html_template/'

[line 28]

Default template path, modify if you placed the template somewhere else. Will be attempted for use if the path is not passed the object.

Type: string

Overrides:

[ Top ]

$default_theme = 'default'

[line 33]

Default template theme.

Type: string

Overrides:

[ Top ]

$filename =

[line 18]

Filename of the template.

Type: string

Overrides:

[ Top ]

$template =

[line 23]

Template text.

Type: string

Overrides:

[ Top ]

$tp_dirs = array()

[line 38]

Template directory.

Type: string

Overrides:

[ Top ]

$tp_main_path =

[line 53]

Main path to template file.

Type: string

Overrides:

[ Top ]

$tp_path =

[line 48]

Path to template file.

Type: string

Overrides:

[ Top ]

$tp_root =

[line 43]

Root path to template file.

Type: string

Overrides:

[ Top ]

$tp_theme =

[line 58]

Template theme.

Type: string

Overrides:

[ Top ]


Class Methods

Template

Template Template( [string $root = './'], [string $path = ''], [string $theme = 'default'])

[line 67]

Constructor

Tags:

  • access - public

Parameters:

  • string $root - The root path of the current script that instantiates this class.
  • string $path - Path of template source file.
  • string $theme - The template theme.

[ Top ]

createRadioSelect

string createRadioSelect( string $name, string $curr_theme)

[line 166]

Creates radio buttons with the list of available templates.

Tags:

  • access - public

Parameters:

  • string $name - Name of the radio button element.
  • string $curr_theme - Current theme, if the current theme is equal to a theme, the theme will be marked "checked"

[ Top ]

createSelectForm

string createSelectForm( string $curr_theme)

[line 149]

Creates and returns a select form element with the available templates as options.

Tags:

  • access - public

Parameters:

  • string $curr_theme - Current theme, if the current theme is equal to a theme, the theme will be marked "selected"

[ Top ]

getTemplateList

array getTemplateList( )

[line 181]

Public interface of the template list variable. Will return the list as array.

Tags:

  • access - public

Parameters:

[ Top ]

load

mixed load( string $tp_fn)

[line 131]

Loads the template file and appends/prepends '"' at the loaded string. Will return the template contents if succesful.

Tags:

  • return - string boolean
  • access - public

Parameters:

  • string $tp_fn - Template filename.

[ Top ]

neutralize

string neutralize( string &$str)

[line 191]

Converts all \ chars to \\ and " to \" of the string

Tags:

  • access - public

Parameters:

  • string &$str - String to be neutralized

[ Top ]

setPath

boolean setPath( [string $path = ''])

[line 80]

Sets the template path

Tags:

  • access - public

Parameters:

  • string $path - Path to template source file

[ Top ]

setTheme

void setTheme( [string $theme = ''])

[line 91]

Sets the template theme

Tags:

  • access - public

Parameters:

  • string $theme - Template theme

[ Top ]

useMainPath

boolean useMainPath( )

[line 100]

Sets the template path to the main path which was set at the construction time

Tags:

  • access - public

Parameters:

[ Top ]

_getTemplates

array _getTemplates( )

[line 113]

Creates a list of available templates returned as array.

Tags:

  • access - private

Parameters:

[ Top ]


Documentation generated on Sun, 16 Nov 2003 01:03:00 +0100 by phpDocumentor 1.2.3