4 * Helper for building a rendered section.
6 * @task compose Composition
7 * @task render Rendering
10 final class PhabricatorMetaMTAMailSection
extends Phobject
{
11 private $plaintextFragments = array();
12 private $htmlFragments = array();
14 public function getHTML() {
15 return $this->htmlFragments
;
18 public function getPlaintext() {
19 return implode("\n", $this->plaintextFragments
);
22 public function addHTMLFragment($fragment) {
23 $this->htmlFragments
[] = $fragment;
27 public function addPlaintextFragment($fragment) {
28 $this->plaintextFragments
[] = $fragment;
32 public function addFragment($fragment) {
33 $this->plaintextFragments
[] = $fragment;
34 $this->htmlFragments
[] =
35 phutil_escape_html_newlines(phutil_tag('div', array(), $fragment));