Tpl::static_directories(): add $details parameter
This commit is contained in:
parent
5d018045c8
commit
6832b83520
1 changed files with 7 additions and 2 deletions
|
@ -745,9 +745,14 @@ class Tpl {
|
|||
|
||||
/**
|
||||
* Get the static directories path
|
||||
* @return array<string>
|
||||
* @param bool $details If true, return a array with root URL as keys and an array of associated
|
||||
* directories as values with their path as key and priority as value
|
||||
* (optional, default: false)
|
||||
* @return ($details is true ? array<string,array<string, int>> : array<string>)
|
||||
*/
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue