Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/calendar/mail/PhabricatorCalendarEventMailReceiver.php
12256 views
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)substr($pattern, 1);
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
}
29
30