str_replace
is not only ugly, but also sluggish if you need to replace ten variables (does a binary search and starts from the beginning for each alternative).
Rather use a preg_replace_callback, either listing all 10 variables at once, or using a late-lookup:
$src = preg_replace_callback('/\{\{(\w+)}}/', 'replace_vars', $src);
# or (NAME|THING|FOO|BAR|FIVE|SIX|SVN|EGT|NNE|TEN)
function replace_vars($match) {
list ($_, $name) = $match;
if (isset($this->vars[$name])) return $this->vars[$name];
}