Controller Class
Handle dynamic content and page requests. Located in the namespace Canteen\Controllers.
Constructor
Item Index
Methods
addData
(
-
name
-
value
Add a data substitution variable
addTitle
(
-
title
-
[separator=.]
Prepend to the page title
getData
()
Dictionary
Get the data variables
Returns:
Dictionary:
Data variables for substitution
parse
(
String
protected
-
content
-
substitutions
Convenience method for parsing content
Parameters:
-
content
StringThe string to parse
-
substitutions
DictionaryThe dictionary of tags to replace
Returns:
String:
The parsed string
process
()
Process the controller, all controllers should extend this function
Properties
data
Dictionary
protected
Any custom substitutions for the parser
parser
Parser
The parser is responsible for rendering templates
profiler
Profiler
The instance of the profiler for debugging performance