private function replacePlaceholders($string)
{
$regex = '~\\[\\[(.*?)\\]\\]~';
preg_match_all($regex, $string, $matches);
if (!empty($matches)) {
foreach ($matches[1] as $id => $value) {
$replacement_key = $this->getKeyFromConstant(trim($value));
if (isset($this->config[$replacement_key])) {
$replacement = $this->config[$replacement_key];
$string = str_replace($matches[0][$id], $replacement, $string);
}
}
}
$fixed_string = $this->fixDirectorySeparators(str_replace('~', $this->getHomeDir(), $string));
return $fixed_string;
}