class SimpleTemplate (View source)

The SimpleTemplate class.

Methods

static string
render(string $string, array $data = array(), array $tags = array('{{', '}}'))

Parse variable and replace it. This method is a simple template engine.

Details

at line line 31
static string render(string $string, array $data = array(), array $tags = array('{{', '}}'))

Parse variable and replace it. This method is a simple template engine.

Example: The {{ foo.bar.yoo }} will be replace to value of $data['foo']['bar']['yoo']

Parameters

string $string The template to replace.
array $data The data to find.
array $tags The variable tags.

Return Value

string Replaced template.