public function buildTemplateMessage($template, $viewParams = array(), $layout = null)
    {
        if ($layout === null)
            $layout = $this->defaultLayout;
        $method = 'buildTemplateMessage_' . $this->templateType;
        if (!method_exists($this, $method))
            $this->templateType = 'php';
        return call_user_func_array(array($this, $method), array($template, $viewParams, $layout));
    }