Remove all "FileHasObject" edge reads and writes
[phabricator.git] / src / applications / doorkeeper / query / DoorkeeperExternalObjectQuery.php
blobbc794cc629243b41aac31261bcb54fa452661fa9
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 loadPage() {
24 return $this->loadStandardPage($this->newResultObject());
27 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) {
28 $where = parent::buildWhereClauseParts($conn);
30 if ($this->phids !== null) {
31 $where[] = qsprintf(
32 $conn,
33 'phid IN (%Ls)',
34 $this->phids);
37 if ($this->objectKeys !== null) {
38 $where[] = qsprintf(
39 $conn,
40 'objectKey IN (%Ls)',
41 $this->objectKeys);
44 return $where;
47 public function getQueryApplicationClass() {
48 return 'PhabricatorDoorkeeperApplication';