Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / metamta / view / PhabricatorMetaMTAMailSection.php
blob536ab923b9a65c612ec2bde0db9a1794529b8729
1 <?php
3 /**
4 * Helper for building a rendered section.
6 * @task compose Composition
7 * @task render Rendering
8 * @group metamta
9 */
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;
24 return $this;
27 public function addPlaintextFragment($fragment) {
28 $this->plaintextFragments[] = $fragment;
29 return $this;
32 public function addFragment($fragment) {
33 $this->plaintextFragments[] = $fragment;
34 $this->htmlFragments[] =
35 phutil_escape_html_newlines(phutil_tag('div', array(), $fragment));
37 return $this;