@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3/**
4 * @extends NuanceQuery<NuanceQueue>
5 */
6final class NuanceQueueQuery
7 extends NuanceQuery {
8
9 private $ids;
10 private $phids;
11
12 public function withIDs(array $ids) {
13 $this->ids = $ids;
14 return $this;
15 }
16
17 public function withPHIDs(array $phids) {
18 $this->phids = $phids;
19 return $this;
20 }
21
22 public function newResultObject() {
23 return new NuanceQueue();
24 }
25
26 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) {
27 $where = parent::buildWhereClauseParts($conn);
28
29 if ($this->ids !== null) {
30 $where[] = qsprintf(
31 $conn,
32 'id IN (%Ld)',
33 $this->ids);
34 }
35
36 if ($this->phids !== null) {
37 $where[] = qsprintf(
38 $conn,
39 'phid IN (%Ls)',
40 $this->phids);
41 }
42
43 return $where;
44 }
45
46}