Page MenuHomec4science

LegalpadMailReceiver.php
No OneTemporary

File Metadata

Created
Mon, Dec 30, 22:14

LegalpadMailReceiver.php

<?php
final class LegalpadMailReceiver extends PhabricatorObjectMailReceiver {
public function isEnabled() {
$app_class = 'PhabricatorLegalpadApplication';
return PhabricatorApplication::isClassInstalled($app_class);
}
protected function getObjectPattern() {
return 'L[1-9]\d*';
}
protected function loadObject($pattern, PhabricatorUser $viewer) {
$id = (int)trim($pattern, 'L');
return id(new LegalpadDocumentQuery())
->setViewer($viewer)
->withIDs(array($id))
->needDocumentBodies(true)
->executeOne();
}
protected function getTransactionReplyHandler() {
return new LegalpadReplyHandler();
}
}

Event Timeline