Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/metamta/query/PhabricatorMetaMTAMailPropertiesQuery.php
12256 views
1
<?php
2
3
final class PhabricatorMetaMTAMailPropertiesQuery
4
extends PhabricatorCursorPagedPolicyAwareQuery {
5
6
private $ids;
7
private $objectPHIDs;
8
9
public function withIDs(array $ids) {
10
$this->ids = $ids;
11
return $this;
12
}
13
14
public function withObjectPHIDs(array $object_phids) {
15
$this->objectPHIDs = $object_phids;
16
return $this;
17
}
18
19
public function newResultObject() {
20
return new PhabricatorMetaMTAMailProperties();
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->objectPHIDs !== null) {
34
$where[] = qsprintf(
35
$conn,
36
'objectPHID IN (%Ls)',
37
$this->objectPHIDs);
38
}
39
40
return $where;
41
}
42
43
public function getQueryApplicationClass() {
44
return 'PhabricatorMetaMTAApplication';
45
}
46
47
}
48
49