Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / doorkeeper / query / DoorkeeperExternalObjectQuery.php
blob2a33206831bdfabca3ff5202536fbbd90fdb6565
1 <?php
3 final class DoorkeeperExternalObjectQuery
4 extends PhabricatorCursorPagedPolicyAwareQuery {
6 protected $phids;
7 protected $objectKeys;
9 public function withPHIDs(array $phids) {
10 $this->phids = $phids;
11 return $this;
14 public function withObjectKeys(array $keys) {
15 $this->objectKeys = $keys;
16 return $this;
19 public function newResultObject() {
20 return new DoorkeeperExternalObject();
23 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) {
24 $where = parent::buildWhereClauseParts($conn);
26 if ($this->phids !== null) {
27 $where[] = qsprintf(
28 $conn,
29 'phid IN (%Ls)',
30 $this->phids);
33 if ($this->objectKeys !== null) {
34 $where[] = qsprintf(
35 $conn,
36 'objectKey IN (%Ls)',
37 $this->objectKeys);
40 return $where;
43 public function getQueryApplicationClass() {
44 return 'PhabricatorDoorkeeperApplication';