public function render()
{
$source = $this->getOption('templateSource');
$templatePathAndFilename = $this->getOption('templatePathAndFilename');
if ($templatePathAndFilename !== null) {
$source = file_get_contents($templatePathAndFilename);
}
return preg_replace_callback('/\\{([a-zA-Z0-9\\-_.]+)\\}/', function ($matches) {
return ObjectAccess::getPropertyPath($this->variables, $matches[1]);
}, $source);
}