1 // vim: set expandtab tabstop=4 shiftwidth=4:
14 * Hooks vs IT Template Engine.
16 * Hooks vs IT (HIT) is a simple template implementation, based on hooks
17 * and IT template systems.
19 * @todo Implementar buffers?
24 /// Root directory where to search for templates.
26 /// Postfix added to the blockname to convert it to a filename.
28 // bool search_path = false
29 // TODO - Para subclases
35 * Gets file name based on the blockname.
37 * @param blockname Name of the block to get the filename.
38 * @return Block's filename.
40 virtual string getFileName(string);
45 * @param filename Name of the file to get the content.
46 * @return File content.
48 virtual string getFileContent(string);
54 * @param root Root directory from where to get the templates.
55 * @param postfix Postfix of the template files.
57 HIT(string = ".", string = ".tpl");
60 * Parses a block replacing keys with values in the hash.
62 * @param blockname Name of the block to parse.
63 * @param vars Hash containing the variable names and their values.
64 * @return Parsed block with variables replaced.
66 string parse(string, Hash&);