From b7076feb885bf15b70ae1dae3e5e41101298093a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 17 Jul 2012 08:28:40 +0200 Subject: [PATCH] added Twig_Loader_Filesystem::getNamespaces() --- lib/Twig/Loader/Filesystem.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/Twig/Loader/Filesystem.php b/lib/Twig/Loader/Filesystem.php index d37e01f76..8c325279a 100644 --- a/lib/Twig/Loader/Filesystem.php +++ b/lib/Twig/Loader/Filesystem.php @@ -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. *