src/Installer.php
protected function templatePath($path, array $path_vars = []) {
    if (strpos($path, '{') !== false) {
      extract($path_vars);
      preg_match_all('@\{\$([A-Za-z0-9_]*)\}@i', $path, $matches);
      if (!empty($matches[1])) {
        foreach ($matches[1] as $var) {
          $path = str_replace('{$' . $var . '}', $$var, $path);
        }
      }
    }

    return $path;
  }
protected function templatePath($path, array $path_vars = []) {
    if (strpos($path, '{') !== false) {
      extract($path_vars);
      preg_match_all('@\{\$([A-Za-z0-9_]*)\}@i', $path, $matches);
      if (!empty($matches[1])) {
        foreach ($matches[1] as $var) {
          $path = str_replace('{$' . $var . '}', $$var, $path);
        }
      }
    }

    return $path;
  }
protected function templatePath ( $ path , array $ path_vars = [ ] ) { if ( strpos ( $ path , '{' ) !== false ) { extract ( $ path_vars ) ; preg_match_all ( '@\{\$([A-Za-z0-9_]*)\}@i' , $ path , $ matches ) ; if ( ! empty ( $ matches [ 1 ] ) ) { foreach ( $ matches [ 1 ] as $ var ) { $ path = str_replace ( '{$' . $ var . '}' , $ $ var , $ path ) ; } } } return $ path ; }
Replace variables in a path

@param  string $path
@param  array  $path_vars
@return string
Replace variables in a path