Constructor
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:
Assign an object to the template (reference)
void
assignObject
(string $key, mixed $object)
-
string
$key: The key
-
mixed
$object: The object
Redefined in descendants as:
Assign a key to the template
void
assignVariable
(string $key, mixed $value)
-
string
$key: The key
-
mixed
$value: The value
Redefined in descendants as:
Render a template an send it to the browser
void
display
(class $view)
-
class
$view: The current view (to get the template)
Redefined in descendants as:
Render a template an returns it as string
string
fetch
(class $view)
-
class
$view: The current view (to get the template)
Redefined in descendants as:
Returns the template directory
string
getTemplateDirectory
()
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').
Redefined in descendants as:
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').
Redefined in descendants as: