From bf4a208ee80a2b7980307fc7ca9ba571f71da049 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Sat, 5 Oct 2024 18:06:45 +0200 Subject: [PATCH] Tpl::static_directories(): add $details parameter --- src/Tpl.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Tpl.php b/src/Tpl.php index ed1c6a0..5ee32df 100644 --- a/src/Tpl.php +++ b/src/Tpl.php @@ -745,9 +745,13 @@ class Tpl { /** * Get the static directories path - * @return array + * @param bool $details If true, return a array with root URL as keys and a list of associated + * directory paths as values (optional, default: false) + * @return ($details is true ? array> : array) */ - public static function static_directories() { + public static function static_directories($details=false) { + if ($details) + return self :: $static_directories; $result = array(); foreach(self :: $static_directories as $root_url => $dirs) foreach(array_keys($dirs) as $dir)