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 files changed, 12 insertions(+), 0 deletions(-) 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 -- 1.7.2.5