Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / repository / query / PhabricatorRepositoryGitLFSRefQuery.php
blob08f0ada159e0d982a8e27018f36e03b215c11641
1 <?php
3 final class PhabricatorRepositoryGitLFSRefQuery
4 extends PhabricatorCursorPagedPolicyAwareQuery {
6 private $ids;
7 private $repositoryPHIDs;
8 private $objectHashes;
10 public function withIDs(array $ids) {
11 $this->ids = $ids;
12 return $this;
15 public function withRepositoryPHIDs(array $phids) {
16 $this->repositoryPHIDs = $phids;
17 return $this;
20 public function withObjectHashes(array $hashes) {
21 $this->objectHashes = $hashes;
22 return $this;
25 public function newResultObject() {
26 return new PhabricatorRepositoryGitLFSRef();
29 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) {
30 $where = parent::buildWhereClauseParts($conn);
32 if ($this->ids !== null) {
33 $where[] = qsprintf(
34 $conn,
35 'id IN (%Ld)',
36 $this->ids);
39 if ($this->repositoryPHIDs !== null) {
40 $where[] = qsprintf(
41 $conn,
42 'repositoryPHID IN (%Ls)',
43 $this->repositoryPHIDs);
46 if ($this->objectHashes !== null) {
47 $where[] = qsprintf(
48 $conn,
49 'objectHash IN (%Ls)',
50 $this->objectHashes);
53 return $where;
56 public function getQueryApplicationClass() {
57 return 'PhabricatorDiffusionApplication';