Public Member Functions | Protected Attributes

RawPHPEngine Class Reference

Inheritance diagram for RawPHPEngine:
Collaboration diagram for RawPHPEngine:

List of all members.

Public Member Functions

 __construct ()
 __get ($key)
 __set ($key, $value)
 __unset ($key)
 __isset ($key)
 display ($template)
 template_exists ($template)
 fetch ($template)
 assign ($key, $value= '')
 assigned ($key)
 clear ()
 append ($key, $value= '')

Protected Attributes

 $engine_vars = array()
 $available_templates = null
 $template_map = array()
 $var_stack = array()

Detailed Description

Habari RawPHPEngine class

The RawPHPEngine is a subclass of the abstract TemplateEngine class which is intended for those theme designers who choose to use raw PHP to design theme templates.

Definition at line 15 of file rawphpengine.php.


Constructor & Destructor Documentation

RawPHPEngine::__construct (  ) 

Constructor for RawPHPEngine

Sets up default values for required settings.

Reimplemented from TemplateEngine.

Reimplemented in HiEngine.

Definition at line 28 of file rawphpengine.php.


Member Function Documentation

RawPHPEngine::__get ( key  ) 

Tries to retrieve a variable from the internal array engine_vars. Method returns the value if succesful, returns false otherwise.

Parameters:
key name of variable

Reimplemented from TemplateEngine.

Definition at line 39 of file rawphpengine.php.

RawPHPEngine::__isset ( key  ) 

Detects if a variable is assigned to the template engine for use in constructing the template's output.

Parameters:
key name of variable
Returns:
boolean true if name is set, false if not set

Reimplemented from TemplateEngine.

Definition at line 73 of file rawphpengine.php.

RawPHPEngine::__set ( key,
value 
)

Assigns a variable to the template engine for use in constructing the template's output.

Parameters:
key name of variable
value value of variable

Reimplemented from TemplateEngine.

Definition at line 51 of file rawphpengine.php.

RawPHPEngine::__unset ( key  ) 

Unassigns a variable to the template engine.

Parameters:
key name of variable

Reimplemented from TemplateEngine.

Definition at line 61 of file rawphpengine.php.

RawPHPEngine::append ( key,
value = '' 
)

Appends to an existing variable more values

Parameters:
key name of variable
value value of variable

Reimplemented from TemplateEngine.

Definition at line 178 of file rawphpengine.php.

RawPHPEngine::assign ( key,
value = '' 
)

Assigns a variable to the template engine for use in constructing the template's output.

Parameters:
key name( s ) of variable
value value of variable

Reimplemented from TemplateEngine.

Definition at line 147 of file rawphpengine.php.

RawPHPEngine::assigned ( key  ) 

Detects if a variable is assigned to the template engine for use in constructing the template's output.

Parameters:
string $key name of variable
Returns:
boolean true if key is set, false if not set

Reimplemented from TemplateEngine.

Definition at line 159 of file rawphpengine.php.

RawPHPEngine::clear (  ) 

Clear all of the assigned template variables

Reimplemented from TemplateEngine.

Definition at line 167 of file rawphpengine.php.

RawPHPEngine::display ( template  ) 

A function which outputs the result of a transposed template to the output stream

Parameters:
template Name of template to display

Todo:
Here would be a good place to notify observers of output. For instance, having sessions/headers output before the template content...

Reimplemented from TemplateEngine.

Reimplemented in HiEngine.

Definition at line 84 of file rawphpengine.php.

Referenced by fetch().

RawPHPEngine::fetch ( template  ) 

A function which returns the content of the transposed template as a string

Parameters:
string $template Name of template to fetch

Reimplemented from TemplateEngine.

Definition at line 132 of file rawphpengine.php.

RawPHPEngine::template_exists ( template  ) 

Returns the existance of the specified template name

Parameters:
string $template Name of template to detect
Returns:
boolean True if the template exists, false if not

Reimplemented from TemplateEngine.

Definition at line 106 of file rawphpengine.php.

Referenced by display(), and HiEngine::display().


The documentation for this class was generated from the following file: