Added handler for arrays in \ncc\Classes\NccExtension > PackageCompiler > compilePackageConstants()
This commit is contained in:
parent
63560ba64b
commit
272c3b9d94
1 changed files with 19 additions and 4 deletions
|
@ -262,11 +262,26 @@
|
||||||
$options = [];
|
$options = [];
|
||||||
foreach($package->Header->Options as $name => $value)
|
foreach($package->Header->Options as $name => $value)
|
||||||
{
|
{
|
||||||
Console::outDebug(sprintf('compiling options const %s (%s)', $name, implode(', ', array_keys($refs))));
|
if(is_array($value))
|
||||||
$options[$name] = self::compileConstants($value, $refs);
|
{
|
||||||
}
|
$options[$name] = [];
|
||||||
$package->Header->Options = $options;
|
foreach($value as $key => $val)
|
||||||
|
{
|
||||||
|
if(!is_string($val))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
Console::outDebug(sprintf('compiling option %s.%s (%s)', $name, $key, implode(', ', array_keys($refs))));
|
||||||
|
$options[$name][$key] = self::compileConstants($val, $refs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console::outDebug(sprintf('compiling option %s (%s)', $name, implode(', ', array_keys($refs))));
|
||||||
|
$options[$name] = self::compileConstants((string)$value, $refs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$package->Header->Options = $options;
|
||||||
$package->Header->RuntimeConstants = $compiled_constants;
|
$package->Header->RuntimeConstants = $compiled_constants;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue