3 final class PhabricatorAuthMessageQuery
4 extends PhabricatorCursorPagedPolicyAwareQuery
{
10 public function withIDs(array $ids) {
15 public function withPHIDs(array $phids) {
16 $this->phids
= $phids;
20 public function withMessageKeys(array $keys) {
21 $this->messageKeys
= $keys;
25 public function newResultObject() {
26 return new PhabricatorAuthMessage();
29 protected function loadPage() {
30 return $this->loadStandardPage($this->newResultObject());
33 protected function buildWhereClauseParts(AphrontDatabaseConnection
$conn) {
34 $where = parent
::buildWhereClauseParts($conn);
36 if ($this->ids
!== null) {
43 if ($this->phids
!== null) {
50 if ($this->messageKeys
!== null) {
53 'messageKey IN (%Ls)',
60 protected function willFilterPage(array $messages) {
61 $message_types = PhabricatorAuthMessageType
::getAllMessageTypes();
63 foreach ($messages as $key => $message) {
64 $message_key = $message->getMessageKey();
66 $message_type = idx($message_types, $message_key);
68 unset($messages[$key]);
69 $this->didRejectResult($message);
73 $message->attachMessageType($message_type);
79 public function getQueryApplicationClass() {
80 return 'PhabricatorAuthApplication';