[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Helper for building a rendered section. 4 * 5 * @task compose Composition 6 * @task render Rendering 7 * @group metamta 8 */ 9 10 final class PhabricatorMetaMTAMailSection { 11 private $plaintextFragments = array(); 12 private $htmlFragments = array(); 13 14 public function getHTML() { 15 return $this->htmlFragments; 16 } 17 18 public function getPlaintext() { 19 return implode("\n", $this->plaintextFragments); 20 } 21 22 public function addHTMLFragment($fragment) { 23 $this->htmlFragments[] = $fragment; 24 return $this; 25 } 26 27 public function addPlaintextFragment($fragment) { 28 $this->plaintextFragments[] = $fragment; 29 return $this; 30 } 31 32 public function addFragment($fragment) { 33 $this->plaintextFragments[] = $fragment; 34 $this->htmlFragments[] = 35 phutil_escape_html_newlines(phutil_tag('div', array(), $fragment)); 36 37 return $this; 38 } 39 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |