mirror of
https://we.phorge.it/source/phorge.git
synced 2025-03-03 16:09:17 +01:00
29 lines
639 B
PHP
29 lines
639 B
PHP
|
<?php
|
||
|
|
||
|
final class PhabricatorSlowvoteMailReceiver
|
||
|
extends PhabricatorObjectMailReceiver {
|
||
|
|
||
|
public function isEnabled() {
|
||
|
return PhabricatorApplication::isClassInstalled(
|
||
|
'PhabricatorSlowvoteApplication');
|
||
|
}
|
||
|
|
||
|
protected function getObjectPattern() {
|
||
|
return 'V[1-9]\d*';
|
||
|
}
|
||
|
|
||
|
protected function loadObject($pattern, PhabricatorUser $viewer) {
|
||
|
$id = (int)substr($pattern, 4);
|
||
|
|
||
|
return id(new PhabricatorSlowvoteQuery())
|
||
|
->setViewer($viewer)
|
||
|
->withIDs(array($id))
|
||
|
->executeOne();
|
||
|
}
|
||
|
|
||
|
protected function getTransactionReplyHandler() {
|
||
|
return new PhabricatorSlowvoteReplyHandler();
|
||
|
}
|
||
|
|
||
|
}
|