Class myMVC_SmartyEngine

Description

Template engine for Views, using Smarty (http://www.smarty.net/)

Located in /myMVC/SmartyEngine.php (line 26)

myMVC_BaseEngine
   |
   --myMVC_SmartyEngine
Method Summary
 myMVC_SmartyEngine __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
Methods
Constructor __construct (line 37)

Constructor.

  • access: public
myMVC_SmartyEngine __construct (string $templateDirectory, string $compileDirectory)
  • string $templateDirectory: The full path of the directory in which the templates are saved
  • string $compileDirectory: The full path of a directory used to compile the Smarty-templates. WARNING: it must be writeable from the webserver's user!

Redefinition of:
myMVC_BaseEngine::__construct()
Constructor
assignObject (line 63)

Assign an object to the template (reference)

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

Redefinition of:
myMVC_BaseEngine::assignObject()
Assign an object to the template (reference)
assignVariable (line 52)

Assign a key to the template

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

Redefinition of:
myMVC_BaseEngine::assignVariable()
Assign a key to the template
display (line 107)

Render a template an send it to the browser

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

Redefinition of:
myMVC_BaseEngine::display()
Render a template an send it to the browser
fetch (line 118)

Render a template an returns it as string

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

Redefinition of:
myMVC_BaseEngine::fetch()
Render a template an returns it as string
registerFunction (line 75)

Register a function to be called from template

  • 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').

Redefinition of:
myMVC_BaseEngine::registerFunction()
Register a function to be called from template
registerModifier (line 92)

Register a modifier to be called from template

  • 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').

Redefinition of:
myMVC_BaseEngine::registerModifier()
Register a modifier to be called from template

Inherited Methods

Inherited From myMVC_BaseEngine

 myMVC_BaseEngine::__construct()
 myMVC_BaseEngine::assignObject()
 myMVC_BaseEngine::assignVariable()
 myMVC_BaseEngine::display()
 myMVC_BaseEngine::fetch()
 myMVC_BaseEngine::getTemplateDirectory()
 myMVC_BaseEngine::registerFunction()
 myMVC_BaseEngine::registerModifier()

Documentation generated on Sat, 20 Oct 2012 08:28:31 +0200 by phpDocumentor 1.4.4