hgTemplate
public class hgTemplate
Broculos.net Programming Tutorials| Field Summary | |
|---|---|
| mixed | |
| Constructor Summary | |
|---|---|
| void | __construct(string file) Creates a new Template object and sets its associated file. |
| Method Summary | |
|---|---|
| void | set(string key, string value) Sets a value for replacing a specific tag. |
| string | output(str str_template) Outputs the content of the template, replacing the keys for its respective values. |
| static string | merge(array templates, string separator, str str_template) Merges the content from an array of templates and separates it with $separator. |
public mixed $sanitize = true
public void __construct(string file)
Creates a new Template object and sets its associated file.
public void set(string key, string value)
Sets a value for replacing a specific tag.
public string output(str str_template)
Outputs the content of the template, replacing the keys for its respective values.
public static string merge(array templates, string separator, str str_template)
Merges the content from an array of templates and separates it with $separator.
Simple template engine class (use [@tag] tags in your templates).