Constructor.
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
Assign an object to the template (reference)
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)
Assign a key to the template
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
Render a template an send it to the browser
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
Render a template an returns it as string
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
Register a function to be called from template
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
Register a modifier to be called from template
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()