Something went wrong. Try again.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
Something went wrong. Try again.
1.8 kB · 89 lines
PHP
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990<?php
/** * @extends PhabricatorCursorPagedPolicyAwareQuery<PhabricatorAuthProviderConfig> */final class PhabricatorAuthProviderConfigQuery extends PhabricatorCursorPagedPolicyAwareQuery {
private $ids; private $phids; private $providerClasses; private $isEnabled;
public function withPHIDs(array $phids) { $this->phids = $phids; return $this; }
public function withIDs(array $ids) { $this->ids = $ids; return $this; }
public function withProviderClasses(array $classes) { $this->providerClasses = $classes; return $this; }
public function withIsEnabled($is_enabled) { $this->isEnabled = $is_enabled; return $this; }
public function newResultObject() { return new PhabricatorAuthProviderConfig(); }
protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { $where = parent::buildWhereClauseParts($conn);
if ($this->ids !== null) { $where[] = qsprintf( $conn, 'id IN (%Ld)', $this->ids); }
if ($this->phids !== null) { $where[] = qsprintf( $conn, 'phid IN (%Ls)', $this->phids); }
if ($this->providerClasses !== null) { $where[] = qsprintf( $conn, 'providerClass IN (%Ls)', $this->providerClasses); }
if ($this->isEnabled !== null) { $where[] = qsprintf( $conn, 'isEnabled = %d', (int)$this->isEnabled); }
return $where; }
protected function willFilterPage(array $configs) {
foreach ($configs as $key => $config) { $provider = $config->getProvider(); if (!$provider) { unset($configs[$key]); continue; } }
return $configs; }
public function getQueryApplicationClass() { return PhabricatorAuthApplication::class; }
}