private static function template($t, $vars = array())
    {
        $t = preg_replace_callback('/\s+|<[^>]++>/', array('self', 'templateCb'), $t);
        array_unshift($vars, $t);
        $code = call_user_func_array('sprintf', $vars);
        return $code;
    }