protected function replacePlaceholders($string, array $variables) { foreach ($variables as $variableName => $variableValue) { $string = str_replace('<' . $variableName . '>', $variableValue, $string); } return $string; }