protected function _templatePath($path, array $vars = array())
    {
        if (strpos($path, '{') !== false) {
            preg_match_all('#\{\$([_a-z0-9]*)\}#i', $path, $matches);
            if (!empty($matches[1])) {
                foreach ($matches[1] as $var) {
                    $path = str_replace('{$' . $var . '}', isset($vars[$var]) ? $vars[$var] : null, $path);
                }
            }
        }
        return $path;
    }