X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/948973a7ec669391a994fb4a02bac5d4cff6aa39..HEAD:/lib/MLIB/Tpl/FileDir.php?ds=inline diff --git a/lib/MLIB/Tpl/FileDir.php b/lib/MLIB/Tpl/FileDir.php index db5721e..f5c12ab 100644 --- a/lib/MLIB/Tpl/FileDir.php +++ b/lib/MLIB/Tpl/FileDir.php @@ -112,21 +112,50 @@ class MLIB_Tpl_FileDir extends /* implements */ MLIB_Tpl } } + /** + * Push a new item into the group array. + * + * @param group Item to be added on the group array. + * + * @todo Add an example. + */ function pushGroup($group = '') { $this->group[] = $group; } + /** + * Pops the actual group from the group array. + * + * @return mixed. + * @todo Add an example. + */ function popGroup() { return array_pop($this->group); } + /** + * Returns the last element of the group array. + * + * @return mixed. + * @todo Add an example. + */ function getGroup() { return end($this->group); } + /** + * Checks if a certain template file exists. + * + * @param name Template file name. + * @param group If it is true, search in the group directory, otherwise + * checks only in the root path. + * + * @return bool. + * @todo Add an example. + */ function exists($name, $group = null) { $tpl = $this->getFileContent($this->getFilename($name, $group));