$id =
(string) $this->container->
getAlias($id);
} if (null !==
$this->referenceVariables &&
isset($this->referenceVariables
[$id])) { return $this->
dumpValue($this->referenceVariables
[$id],
$interpolate);
} return $this->
getServiceCall($id,
$value);
} elseif ($value instanceof Expression
) { return $this->
getExpressionLanguage()->
compile((string) $value,
['container' => 'container'
]);
} elseif ($value instanceof Parameter
) { return $this->
dumpParameter($value);
} elseif (true ===
$interpolate && \
is_string($value)) { if (preg_match('/^%([^%]+)%$/',
$value,
$match)) { // we do this to deal with non string values (Boolean, integer, ...)
// the preg_replace_callback converts them to strings
return $this->
dumpParameter($match[1
]);
} else { $replaceParameters =
fn ($match) => "'.".
$this->
dumpParameter($match[2
]).".'";
$code =
str_replace('%%', '%',
preg_replace_callback('/(?<!%)(%)([^%]+)\1/',
$replaceParameters,
$this->
export($value)));
return $code;
}