Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96162861
PhabricatorMailOutboundMailHeraldAdapter.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
Mon, Dec 23, 08:31
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Dec 25, 08:31 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23128768
Attached To
rPH Phabricator
PhabricatorMailOutboundMailHeraldAdapter.php
View Options
<?php
final
class
PhabricatorMailOutboundMailHeraldAdapter
extends
HeraldAdapter
{
private
$mail
;
public
function
getAdapterApplicationClass
()
{
return
'PhabricatorMetaMTAApplication'
;
}
public
function
getAdapterContentDescription
()
{
return
pht
(
'Route outbound email.'
);
}
protected
function
initializeNewAdapter
()
{
$this
->
mail
=
$this
->
newObject
();
}
protected
function
newObject
()
{
return
new
PhabricatorMetaMTAMail
();
}
public
function
isTestAdapterForObject
(
$object
)
{
return
(
$object
instanceof
PhabricatorMetaMTAMail
);
}
public
function
getAdapterTestDescription
()
{
return
pht
(
'Test rules which run when outbound mail is being prepared for '
.
'delivery.'
);
}
public
function
getObject
()
{
return
$this
->
mail
;
}
public
function
setObject
(
PhabricatorMetaMTAMail
$mail
)
{
$this
->
mail
=
$mail
;
return
$this
;
}
public
function
getAdapterContentName
()
{
return
pht
(
'Outbound Mail'
);
}
public
function
isSingleEventAdapter
()
{
return
true
;
}
public
function
supportsRuleType
(
$rule_type
)
{
switch
(
$rule_type
)
{
case
HeraldRuleTypeConfig
::
RULE_TYPE_GLOBAL
:
case
HeraldRuleTypeConfig
::
RULE_TYPE_PERSONAL
:
return
true
;
case
HeraldRuleTypeConfig
::
RULE_TYPE_OBJECT
:
default
:
return
false
;
}
}
public
function
getHeraldName
()
{
return
pht
(
'Mail %d'
,
$this
->
getObject
()->
getID
());
}
}
Event Timeline
Log In to Comment