}
}
+ /**
+ * 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));