From: Fabien Potencier Date: Tue, 17 Jul 2012 06:28:40 +0000 (+0200) Subject: added Twig_Loader_Filesystem::getNamespaces() X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=b7076feb885bf15b70ae1dae3e5e41101298093a;p=web%2Fkonrad%2Ftwig.git added Twig_Loader_Filesystem::getNamespaces() --- diff --git a/lib/Twig/Loader/Filesystem.php b/lib/Twig/Loader/Filesystem.php index d37e01f..8c32527 100644 --- a/lib/Twig/Loader/Filesystem.php +++ b/lib/Twig/Loader/Filesystem.php @@ -43,6 +43,18 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface } /** + * 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. * * @param string|array $paths A path or an array of paths where to look for templates