Tpl::static_directories(): add $details parameter
This commit is contained in:
parent
5d018045c8
commit
bf4a208ee8
1 changed files with 6 additions and 2 deletions
|
@ -745,9 +745,13 @@ class Tpl {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the static directories path
|
* Get the static directories path
|
||||||
* @return array<string>
|
* @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<string,array<string>> : array<string>)
|
||||||
*/
|
*/
|
||||||
public static function static_directories() {
|
public static function static_directories($details=false) {
|
||||||
|
if ($details)
|
||||||
|
return self :: $static_directories;
|
||||||
$result = array();
|
$result = array();
|
||||||
foreach(self :: $static_directories as $root_url => $dirs)
|
foreach(self :: $static_directories as $root_url => $dirs)
|
||||||
foreach(array_keys($dirs) as $dir)
|
foreach(array_keys($dirs) as $dir)
|
||||||
|
|
Loading…
Reference in a new issue