Changeset View
Changeset View
Standalone View
Standalone View
src/applications/herald/controller/HeraldTestConsoleController.php
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | if ($request->isFormPost()) { | ||||
$adapter = id(new HeraldPholioMockAdapter()) | $adapter = id(new HeraldPholioMockAdapter()) | ||||
->setMock($object); | ->setMock($object); | ||||
} else if ($object instanceof PhrictionDocument) { | } else if ($object instanceof PhrictionDocument) { | ||||
$adapter = id(new PhrictionDocumentHeraldAdapter()) | $adapter = id(new PhrictionDocumentHeraldAdapter()) | ||||
->setDocument($object); | ->setDocument($object); | ||||
} else if ($object instanceof PonderQuestion) { | } else if ($object instanceof PonderQuestion) { | ||||
$adapter = id(new HeraldPonderQuestionAdapter()) | $adapter = id(new HeraldPonderQuestionAdapter()) | ||||
->setQuestion($object); | ->setQuestion($object); | ||||
} else if ($object instanceof PhabricatorMetaMTAMail) { | |||||
$adapter = id(new PhabricatorMailOutboundMailHeraldAdapter()) | |||||
->setObject($object); | |||||
} else { | } else { | ||||
throw new Exception(pht('Can not build adapter for object!')); | throw new Exception(pht('Can not build adapter for object!')); | ||||
} | } | ||||
$adapter->setIsNewObject(false); | $adapter->setIsNewObject(false); | ||||
$rules = id(new HeraldRuleQuery()) | $rules = id(new HeraldRuleQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |