\myMVC_SmartyEngine

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

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

Summary

Methods
Properties
Constants
__construct()
getTemplateDirectory()
assignVariable()
assignObject()
registerFunction()
registerModifier()
display()
fetch()
No public properties found
No constants found
No protected methods found
$templateDirectory
$compileDirectory
N/A
No private methods found
$smarty
N/A

Properties

$templateDirectory

$templateDirectory : 

Type

$compileDirectory

$compileDirectory : 

Type

$smarty

$smarty : 

Type

Methods

__construct()

__construct(string  $templateDirectory, string  $compileDirectory) 

Constructor.

Parameters

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!

getTemplateDirectory()

getTemplateDirectory() : string

Returns the template directory

Returns

string —

The template directory

assignVariable()

assignVariable(string  $key, mixed  $value) 

Assign a key to the template

Parameters

string $key

The key

mixed $value

The value

assignObject()

assignObject(string  $key, mixed  $object) 

Assign an object to the template (reference)

Parameters

string $key

The key

mixed $object

The object

registerFunction()

registerFunction(string  $name, mixed  $func) 

Register a function to be called from template

Parameters

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

registerModifier()

registerModifier(string  $name, mixed  $func) 

Register a modifier to be called from template

Parameters

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

display()

display(\class  $view) 

Render a template an send it to the browser

Parameters

\class $view

The current view (to get the template)

fetch()

fetch(\class  $view) : string

Render a template an returns it as string

Parameters

\class $view

The current view (to get the template)

Returns

string —

The rendered template