Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/nuance/query/NuanceQueueQuery.php
12256 views
1
<?php
2
3
final class NuanceQueueQuery
4
extends NuanceQuery {
5
6
private $ids;
7
private $phids;
8
9
public function withIDs(array $ids) {
10
$this->ids = $ids;
11
return $this;
12
}
13
14
public function withPHIDs(array $phids) {
15
$this->phids = $phids;
16
return $this;
17
}
18
19
public function newResultObject() {
20
return new NuanceQueue();
21
}
22
23
protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) {
24
$where = parent::buildWhereClauseParts($conn);
25
26
if ($this->ids !== null) {
27
$where[] = qsprintf(
28
$conn,
29
'id IN (%Ld)',
30
$this->ids);
31
}
32
33
if ($this->phids !== null) {
34
$where[] = qsprintf(
35
$conn,
36
'phid IN (%Ls)',
37
$this->phids);
38
}
39
40
return $where;
41
}
42
43
}
44
45