~ubuntu-branches/ubuntu/wily/phabricator/wily

« back to all changes in this revision

Viewing changes to phabricator/src/applications/calendar/mail/PhabricatorCalendarEventMailReceiver.php

  • Committer: Package Import Robot
  • Author(s): Richard Sellam
  • Date: 2015-04-28 03:01:19 UTC
  • mfrom: (0.22.1) (0.21.1) (0.17.2) (2.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20150428030119-36t1maxz1gh3ojyg
Tags: 0~git20150428-1
* New snapshot release
* fixed nginx configuration (closes: #779705)
* start mysql before phd daemons, if available (closes: #780260, #780265)
* fixed log files permissions (closes: #781825)
* added spanish translation (closes: #783566)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
final class PhabricatorCalendarEventMailReceiver
 
4
  extends PhabricatorObjectMailReceiver {
 
5
 
 
6
  public function isEnabled() {
 
7
    $app_class = 'PhabricatorCalendarApplication';
 
8
    return PhabricatorApplication::isClassInstalled($app_class);
 
9
  }
 
10
 
 
11
  protected function getObjectPattern() {
 
12
    return 'E[1-9]\d*';
 
13
  }
 
14
 
 
15
  protected function loadObject($pattern, PhabricatorUser $viewer) {
 
16
    $id = (int)trim($pattern, 'E');
 
17
 
 
18
    return id(new PhabricatorCalendarEventQuery())
 
19
      ->setViewer($viewer)
 
20
      ->withIDs(array($id))
 
21
      ->executeOne();
 
22
  }
 
23
 
 
24
  protected function getTransactionReplyHandler() {
 
25
    return new PhabricatorCalendarReplyHandler();
 
26
  }
 
27
 
 
28
}