N°8772 - Compiler: add dynamic bindings

This commit is contained in:
Eric Espie
2025-12-10 18:07:39 +01:00
parent 4d7183e067
commit 49ff9378aa
2 changed files with 43 additions and 1 deletions

View File

@@ -34,7 +34,11 @@ class Property extends AbstractProperty
$sInputs = '';
foreach ($this->oValueType->GetInputs() as $sInput => $sValue) {
$sInputs .= "\n ->SetInputValue('$sInput', '$sValue')";
if (preg_match("/^{{(?<node>\w+)\.(?<output>\w+)}}$/", $sValue, $aMatches) === 1) {
$sInputs .= "\n ->InputDependsOn('$sInput', '{$aMatches['node']}', '{$aMatches['output']}')";
} else {
$sInputs .= "\n ->SetInputValue('$sInput', '$sValue')";
}
}
return <<<PHP