public function ScaffoldFileInfo::interpolate in Drupal 9
Same name and namespace in other branches
- 8 composer/Plugin/Scaffold/ScaffoldFileInfo.php \Drupal\Composer\Plugin\Scaffold\ScaffoldFileInfo::interpolate()
Replaces placeholders in a message.
Parameters
string $message: Message with placeholders to fill in.
array $extra: Additional data to merge with the interpolator.
mixed $default: Default value to use for missing placeholders, or FALSE to keep them.
Return value
string Interpolated string with placeholders replaced.
File
- composer/
Plugin/ Scaffold/ ScaffoldFileInfo.php, line 105
Class
- ScaffoldFileInfo
- Data object that keeps track of one scaffold file.
Namespace
Drupal\Composer\Plugin\ScaffoldCode
public function interpolate($message, array $extra = [], $default = FALSE) {
$interpolator = $this->destination
->getInterpolator();
return $interpolator
->interpolate($message, $extra, $default);
}