added Twig_Loader_Filesystem::getNamespaces()

This commit is contained in:
Fabien Potencier
2012-07-17 08:28:40 +02:00
parent 8f7ccd1355
commit b7076feb88
+12
View File
@@ -42,6 +42,18 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface
return isset($this->paths[$namespace]) ? $this->paths[$namespace] : array();
}
/**
* Returns the path namespaces.
*
* The "__main__" namespace is always defined.
*
* @return array The array of defined namespaces
*/
public function getNamespaces()
{
return array_keys($this->paths[$namespace]);
}
/**
* Sets the paths where templates are stored.
*