public/src/EmailControl/Email.php
private function getTemplateHtml(): string
    {
        if ($this->template) {
            $read = new Read();
            $read->exeRead("email_template", "WHERE id = :id", "id={$this->template}");
            if ($read->getResult()) {
                $url = json_decode($read->getResult()[0]['template'], true)[0]['url'];
                $template = pathinfo($url, PATHINFO_BASENAME);
                $dirTemplate = pathinfo($url, PATHINFO_DIRNAME);
            }
        }

        if (!isset($template)) {
            $dirTemplate = PATH_HOME . VENDOR . "email-control/public/tpl/model";
            $template = "content.tpl";
        }

        $this->setVariables($this->getVariablesDefault());

        $this->variables['content'] = $this->getContent($dirTemplate, $template);

        return $this->getHtml();

    }
private function getTemplateHtml(): string
    {
        if ($this->template) {
            $read = new Read();
            $read->exeRead("email_template", "WHERE id = :id", "id={$this->template}");
            if ($read->getResult()) {
                $url = json_decode($read->getResult()[0]['template'], true)[0]['url'];
                $template = pathinfo($url, PATHINFO_BASENAME);
                $dirTemplate = pathinfo($url, PATHINFO_DIRNAME);
            }
        }

        if (!isset($template)) {
            $dirTemplate = PATH_HOME . VENDOR . "email-control/public/tpl/model";
            $template = "content.tpl";
        }

        $this->setVariables($this->getVariablesDefault());

        $this->variables['content'] = $this->getContent($dirTemplate, $template);

        return $this->getHtml();

    }
Retorna estrutura HTML com variáveis aplicada no template
@return string