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)
 queue_dirs ($dirs)
 template_exists ($template)
 fetch ($template)
 assign ($key, $value= '')
 assigned ($key)
 clear ()
 append ($key, $value= '')
 add_template ($name, $file, $replace=false)

Protected Attributes

 $engine_vars = array()
 $available_templates = array()
 $template_map = array()
 $var_stack = array()
 $loaded_templates = false

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 17 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 31 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 42 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 76 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 54 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 64 of file rawphpengine.php.

RawPHPEngine::add_template ( name,
file,
replace = false 
)

Adds and/or replaces a previously queued template in the available template listing

Parameters:
string $name The name of the template
string $file The file of the template
bool $replace

Reimplemented from TemplateEngine.

Definition at line 219 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 203 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 172 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 184 of file rawphpengine.php.

RawPHPEngine::clear (  ) 

Clear all of the assigned template variables

Reimplemented from TemplateEngine.

Definition at line 192 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

Reimplemented from TemplateEngine.

Reimplemented in HiEngine.

Definition at line 87 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 157 of file rawphpengine.php.

RawPHPEngine::queue_dirs ( dirs  ) 

Search directories for templates to use Templates are always taken from the first directory they're found in. To override this behavior, the template must be specifically added via ->add_template()

See also:
add_template
Parameters:
string|array $dirs A directory to look for templates in

Reimplemented from TemplateEngine.

Definition at line 109 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 146 of file rawphpengine.php.

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


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