Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / phame / herald / HeraldPhameBlogAdapter.php
blobd9368a97d25865f8d0652be86f0c9e5e219efb29
1 <?php
3 final class HeraldPhameBlogAdapter extends HeraldAdapter {
5 private $blog;
7 protected function newObject() {
8 return new PhameBlog();
11 public function getAdapterApplicationClass() {
12 return 'PhabricatorPhameApplication';
15 public function getAdapterContentDescription() {
16 return pht('React to Phame Blogs being created or updated.');
19 protected function initializeNewAdapter() {
20 $this->blog = $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 setBlog(PhameBlog $blog) {
39 $this->blog = $blog;
40 return $this;
43 public function getObject() {
44 return $this->blog;
47 public function getAdapterContentName() {
48 return pht('Phame Blogs');
51 public function getHeraldName() {
52 return 'BLOG'.$this->getObject()->getID();