3 final class HeraldPholioMockAdapter
extends HeraldAdapter
{
7 public function getAdapterApplicationClass() {
8 return 'PhabricatorPholioApplication';
11 public function getAdapterContentDescription() {
12 return pht('React to mocks being created or updated.');
15 protected function initializeNewAdapter() {
16 $this->mock
= $this->newObject();
19 protected function newObject() {
20 return new PholioMock();
23 public function isTestAdapterForObject($object) {
24 return ($object instanceof PholioMock
);
27 public function getAdapterTestDescription() {
29 'Test rules which run when a mock is created or updated.');
32 public function setObject($object) {
33 $this->mock
= $object;
37 public function getObject() {
41 public function setMock(PholioMock
$mock) {
46 public function getMock() {
50 public function getAdapterContentName() {
51 return pht('Pholio Mocks');
54 public function supportsRuleType($rule_type) {
56 case HeraldRuleTypeConfig
::RULE_TYPE_GLOBAL
:
57 case HeraldRuleTypeConfig
::RULE_TYPE_PERSONAL
:
59 case HeraldRuleTypeConfig
::RULE_TYPE_OBJECT
:
65 public function getHeraldName() {
66 return 'M'.$this->getMock()->getID();