Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96564464
HeraldPholioMockAdapter.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
Sat, Dec 28, 04:34
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Dec 30, 04:34 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23207341
Attached To
rPH Phabricator
HeraldPholioMockAdapter.php
View Options
<?php
final
class
HeraldPholioMockAdapter
extends
HeraldAdapter
{
private
$mock
;
public
function
getAdapterApplicationClass
()
{
return
'PhabricatorPholioApplication'
;
}
public
function
getAdapterContentDescription
()
{
return
pht
(
'React to mocks being created or updated.'
);
}
protected
function
initializeNewAdapter
()
{
$this
->
mock
=
$this
->
newObject
();
}
protected
function
newObject
()
{
return
new
PholioMock
();
}
public
function
getObject
()
{
return
$this
->
mock
;
}
public
function
setMock
(
PholioMock
$mock
)
{
$this
->
mock
=
$mock
;
return
$this
;
}
public
function
getMock
()
{
return
$this
->
mock
;
}
public
function
getAdapterContentName
()
{
return
pht
(
'Pholio Mocks'
);
}
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
getActions
(
$rule_type
)
{
switch
(
$rule_type
)
{
case
HeraldRuleTypeConfig
::
RULE_TYPE_GLOBAL
:
return
array_merge
(
array
(
self
::
ACTION_ADD_CC
,
self
::
ACTION_REMOVE_CC
,
),
parent
::
getActions
(
$rule_type
));
case
HeraldRuleTypeConfig
::
RULE_TYPE_PERSONAL
:
return
array_merge
(
array
(
self
::
ACTION_ADD_CC
,
self
::
ACTION_REMOVE_CC
,
),
parent
::
getActions
(
$rule_type
));
}
}
public
function
getHeraldName
()
{
return
'M'
.
$this
->
getMock
()->
getID
();
}
}
Event Timeline
Log In to Comment