Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102890138
PhabricatorMetaMTAMailSection.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Feb 25, 06:06
Size
866 B
Mime Type
text/x-php
Expires
Thu, Feb 27, 06:06 (2 d)
Engine
blob
Format
Raw Data
Handle
24453902
Attached To
rPH Phabricator
PhabricatorMetaMTAMailSection.php
View Options
<?php
/**
* Helper for building a rendered section.
*
* @task compose Composition
* @task render Rendering
* @group metamta
*/
final
class
PhabricatorMetaMTAMailSection
{
private
$plaintextFragments
=
array
();
private
$htmlFragments
=
array
();
public
function
getHTML
()
{
return
$this
->
htmlFragments
;
}
public
function
getPlaintext
()
{
return
implode
(
"
\n
"
,
$this
->
plaintextFragments
);
}
public
function
addHTMLFragment
(
$fragment
)
{
$this
->
htmlFragments
[]
=
$fragment
;
return
$this
;
}
public
function
addPlaintextFragment
(
$fragment
)
{
$this
->
plaintextFragments
[]
=
$fragment
;
return
$this
;
}
public
function
addFragment
(
$fragment
)
{
$this
->
plaintextFragments
[]
=
$fragment
;
$this
->
htmlFragments
[]
=
phutil_escape_html_newlines
(
phutil_tag
(
'div'
,
array
(),
$fragment
));
return
$this
;
}
}
Event Timeline
Log In to Comment