[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/maniphest/mail/ -> ManiphestTaskMailReceiver.php (source)

   1  <?php
   2  
   3  final class ManiphestTaskMailReceiver extends PhabricatorObjectMailReceiver {
   4  
   5    public function isEnabled() {
   6      $app_class = 'PhabricatorManiphestApplication';
   7      return PhabricatorApplication::isClassInstalled($app_class);
   8    }
   9  
  10    protected function getObjectPattern() {
  11      return 'T[1-9]\d*';
  12    }
  13  
  14    protected function loadObject($pattern, PhabricatorUser $viewer) {
  15      $id = (int)trim($pattern, 'T');
  16  
  17      $results = id(new ManiphestTaskQuery())
  18        ->setViewer($viewer)
  19        ->withIDs(array($id))
  20        ->execute();
  21  
  22      return head($results);
  23    }
  24  
  25    protected function processReceivedObjectMail(
  26      PhabricatorMetaMTAReceivedMail $mail,
  27      PhabricatorLiskDAO $object,
  28      PhabricatorUser $sender) {
  29  
  30      $handler = PhabricatorEnv::newObjectFromConfig(
  31        'metamta.maniphest.reply-handler');
  32      $handler->setMailReceiver($object);
  33  
  34      $handler->setActor($sender);
  35      $handler->setExcludeMailRecipientPHIDs(
  36        $mail->loadExcludeMailRecipientPHIDs());
  37      $handler->processEmail($mail);
  38    }
  39  
  40  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1