Abstract Class myMVC_BaseEngine

Description

Base class for a template engine.

This does nothing and must be derived. See myMVC_SmartyEngine for a template engine using Smarty (http://www.smarty.net/)

  • abstract:

Located in /myMVC/BaseEngine.php (line 30)


	
			
Direct descendents
Class Description
 class myMVC_SmartyEngine Template engine for Views, using Smarty (http://www.smarty.net/)
Variable Summary
Method Summary
 myMVC_BaseEngine __construct (string $templateDirectory, string $compileDirectory)
 void assignObject (string $key, mixed $object)
 void assignVariable (string $key, mixed $value)
 void display (class $view)
 string fetch (class $view)
 void registerFunction (string $name, mixed $func)
 void registerModifier (string $name, mixed $func)
Variables
mixed $compileDirectory (line 33)
  • access: protected
mixed $templateDirectory (line 32)
  • access: protected
Methods
Constructor __construct (line 42)

Constructor

  • throws: myMVC_MVCException On problems
  • access: public
myMVC_BaseEngine __construct (string $templateDirectory, string $compileDirectory)
  • string $templateDirectory: Directory with the templates
  • string $compileDirectory: Directory with the compiled templates (from engine)

Redefined in descendants as:
assignObject (line 102)

Assign an object to the template (reference)

  • abstract:
  • access: public
void assignObject (string $key, mixed $object)
  • string $key: The key
  • mixed $object: The object

Redefined in descendants as:
assignVariable (line 94)

Assign a key to the template

  • abstract:
  • access: public
void assignVariable (string $key, mixed $value)
  • string $key: The key
  • mixed $value: The value

Redefined in descendants as:
display (line 127)

Render a template an send it to the browser

  • abstract:
  • access: public
void display (class $view)
  • class $view: The current view (to get the template)

Redefined in descendants as:
fetch (line 135)

Render a template an returns it as string

  • return: The rendered template
  • abstract:
  • access: public
string fetch (class $view)
  • class $view: The current view (to get the template)

Redefined in descendants as:
getTemplateDirectory (line 83)

Returns the template directory

  • return: The template directory
  • access: public
string getTemplateDirectory ()
registerFunction (line 111)

Register a function to be called from template

  • abstract:
  • access: public
void registerFunction (string $name, mixed $func)
  • string $name: The name of the function (in template!!)
  • mixed $func: The name function or method (method in the format class::method) Also accepted in the format array('class', 'method').

Redefined in descendants as:
registerModifier (line 120)

Register a modifier to be called from template

  • abstract:
  • access: public
void registerModifier (string $name, mixed $func)
  • string $name: The name of the modifier (in template!!)
  • mixed $func: The name function or method (method in the format class::method) Also accepted in the format array('class', 'method').

Redefined in descendants as:

Documentation generated on Wed, 27 Jun 2012 09:45:11 +0200 by phpDocumentor 1.4.4