Gumbo_Template
Variables
- $_global_dir_cache
- $_global_dir_compile
- $_global_dir_config
- $_global_dir_tpl
- $_global_engine
- $_global_left_del
- $_global_right_del
- $_global_vars
Methods
Template Class
The Template Class is responsible for saving global Template values and loading the appropriate Template Engine. The program can easily use the global settings to easily pull the appropriate Engine without defining the specific engine. For example, if the application uses one type of Template Engine throughout, this class will automatically load the defined Engine. All properties are static to preserve their state.
$tpl = new Gumbo_Template (); $tpl->factory ()->engineMethod ();
Author(s): |
Michael Luster <mluster79@yahoo.com> |
License: | New BSD License |
Copyright: | Copyright (c) 2007, iBayou, Michael Luster |
Link: | http://sourceforge.net/projects/phpgumbo |
Version: | 0.0.1 |
Implements interfaces:
Class Variables
Class Methods
Assigns a global template variable
All global template variable references will be prepended with "global_*" string. This will separate the global variables from local template variables.
Parameter(s):
- (string|array) $key :: template reference
- (mixed) $val :: template value
- throws:
Gumbo_Exception - precondition:
must be a primitive type Implementation of:
[ Top ]public static string getDirCache ( ) [line 387]Returns the global Template cache directory
Implementation of:
[ Top ]public static string getDirCompile ( ) [line 379]Returns the global Template compile directory
Implementation of:
[ Top ]public static string getDirConfig ( ) [line 395]Returns the global Template config directory
Implementation of:
[ Top ]public static string getDirTpl ( ) [line 371]Returns the global Template directory
Implementation of:
[ Top ]public static string getEngine ( ) [line 331]Returns the global template engine
Implementation of:
[ Top ]public static string getLeftDelimeter ( ) [line 403]Returns the global left delimeter
Implementation of:
[ Top ]public static string getRightDelimeter ( ) [line 411]Returns the global right delimeter
Implementation of:
[ Top ]public static mixed getVar ( string $key ) [line 341]Returns a global template variable value
Parameter(s):
- (string) $key :: variable reference
- throws:
Gumbo_Exception Implementation of:
[ Top ]public static array getVars ( ) [line 363]Returns all the global template variables
Implementation of:
[ Top ]public static bool isEngine ( string $engine ) [line 424]Returns if the Template Engine exists
Parameter(s):
- (string) $engine
- throws:
Gumbo_Exception - uses:
Gumbo_Load Implementation of:
[ Top ]public static void setDirCache ( string $loc ) [line 246]Sets the global template file cache directory
Parameter(s):
- (string) $loc
- throws:
Gumbo_Exception - precondition:
is_dir ($loc) Implementation of:
[ Top ]public static void setDirCompile ( string $loc ) [line 223]Sets the global template file compile directory
Parameter(s):
- (string) $loc
- throws:
Gumbo_Exception - precondition:
is_dir ($loc) Implementation of:
[ Top ]public static void setDirConfig ( string $loc ) [line 269]Sets the global template file config directory
Parameter(s):
- (string) $loc
- throws:
Gumbo_Exception - precondition:
is_dir ($loc) Implementation of:
[ Top ]public static void setDirTpl ( string $loc ) [line 200]Sets the global template file directory
Parameter(s):
- (string) $loc
- throws:
Gumbo_Exception - precondition:
is_dir ($loc) Implementation of:
[ Top ]public static void setEngine ( string $engine ) [line 176]Sets the global template engine to use
Parameter(s):
- (string) $engine
- throws:
Gumbo_Exception Implementation of:
[ Top ]public static void setLeftDelimeter ( string $val ) [line 291]Sets the global left delimeter value
Parameter(s):
- (string) $val
- throws:
Gumbo_Exception Implementation of:
[ Top ]public static void setRightDelimeter ( string $val ) [line 310]Sets the global right delimeter value
Parameter(s):
- (string) $val
- throws:
Gumbo_Exception Implementation of:
[ Top ]public static void unassign ( string $key ) [line 151]Removes the global variable assignment
Parameter(s):
- (string) $key :: template variable reference
- throws:
Gumbo_Exception Implementation of:
[ Top ]public Gumbo_Interface_Template_Engine factory ( [string $name], [string $args] ) [line 80]Creates a new Template_Engine object
Parameter(s):
- (string) $name :: template file name (optional)
- (string) $args :: name of the engine
- throws:
Gumbo_Exception - uses:
Gumbo_Load
[ Top ]