Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / phame / herald / HeraldPhamePostAdapter.php
blob72e712427141b06a1c47c6031871f65ed57964b4
1 <?php
3 final class HeraldPhamePostAdapter extends HeraldAdapter {
5 private $post;
7 protected function newObject() {
8 return new PhamePost();
11 public function getAdapterApplicationClass() {
12 return 'PhabricatorPhameApplication';
15 public function getAdapterContentDescription() {
16 return pht('React to Phame Posts being created or updated.');
19 protected function initializeNewAdapter() {
20 $this->post = $this->newObject();
23 public function supportsApplicationEmail() {
24 return true;
27 public function supportsRuleType($rule_type) {
28 switch ($rule_type) {
29 case HeraldRuleTypeConfig::RULE_TYPE_GLOBAL:
30 case HeraldRuleTypeConfig::RULE_TYPE_PERSONAL:
31 return true;
32 case HeraldRuleTypeConfig::RULE_TYPE_OBJECT:
33 default:
34 return false;
38 public function setPost(PhamePost $post) {
39 $this->post = $post;
40 return $this;
43 public function getObject() {
44 return $this->post;
47 public function getAdapterContentName() {
48 return pht('Phame Posts');
51 public function getHeraldName() {
52 return 'POST'.$this->getObject()->getID();