function process($template)
{
$template = preg_replace_callback('/\\{hi:(".+?")((?:\\s*[\\w\\.]+){0,2})\\s*\\}/smu', array($this, 'hi_quote'), $template);
$template = preg_replace_callback('%\\{hi:([^\\?]+?)\\}(.+?)\\{/hi:\\1\\}%ism', array($this, 'hi_loop'), $template);
$template = preg_replace_callback('%\\{hi:\\?\\s*(.+?)\\}(.+?)\\{/hi:\\?\\}%ismu', array($this, 'hi_if'), $template);
$template = preg_replace_callback('%\\{hi:([^:}]+?:.+?)\\}%i', array($this, 'hi_command'), $template);
$template = preg_replace_callback('%\\{hi:(.+?)\\}%i', array($this, 'hi_var'), $template);
return $template;
}