Leandro Lucarella ------------------------------------------------------------------------------- $Id$ -----------------------------------------------------------------------------*/ /** * Templates interface for mlib. * This interface define the basic behavoir of all the template implementations * in mlib. It has 4 method which are the only ones you should use when drawing * your components. * * @todo Add a global example using all the methods. * @author Leandro Lucarella * @author Martín Marrese * @since 1.0 */ class /* interface */ MLIB_Tpl { /** * Returns a parsed template. * This function parses a template $name in the $group (or the current group * if it's null), replacing the variables specified by $vars. $vars can be a * string (in which case it's replaced by the value $val) or an asociative * array, where the keys are the variables to replace and the values are the * text to put in the place of the variable. * * @param string $name Name of template to parse. * @param mixed $vars Variables to replace in the template. * @param string $val If $vars is a string, the value to replace * for $vars. * * @return The parsed template $name (in $group) with its $vars replaced. * @todo Add an example. */ function parse($name, $vars = '', $val = '', $group = null) { trigger_error('Not implemented!', E_USER_ERROR); } /** * Sets the group to use and add it to the groups stack. * * @param group Group to use (and add to the groups stack). * @todo Add an example. */ function pushGroup($group = '') { trigger_error('Not implemented!', E_USER_ERROR); } /** * Removes the current group from the groups stack and returns it. * * @return Last used group. * @todo Add an example. */ function popGroup() { trigger_error('Not implemented!', E_USER_ERROR); } /** * Returns the current group from the groups stack. * * @return Current group. * @todo Add an example. */ function getGroup() { trigger_error('Not implemented!', E_USER_ERROR); } /** * Tells if a template exists. * True if the template $name exists in $group (or the current group if * $group is null) * * @param name Name of the template. * @param group Template's group. If it's null it uses the current group. * * @return true if template $name exists in $group, false if not. * @todo Add an example. */ function exists($name, $group = null) { trigger_error('Not implemented!', E_USER_ERROR); } } ?>