Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/query/PhabricatorExternalAccountQuery.php
Show All 15 Lines | final class PhabricatorExternalAccountQuery | ||||
private $ids; | private $ids; | ||||
private $phids; | private $phids; | ||||
private $accountTypes; | private $accountTypes; | ||||
private $accountDomains; | private $accountDomains; | ||||
private $accountIDs; | private $accountIDs; | ||||
private $userPHIDs; | private $userPHIDs; | ||||
private $needImages; | private $needImages; | ||||
private $accountSecrets; | private $accountSecrets; | ||||
private $providerConfigPHIDs; | |||||
public function withUserPHIDs(array $user_phids) { | public function withUserPHIDs(array $user_phids) { | ||||
$this->userPHIDs = $user_phids; | $this->userPHIDs = $user_phids; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function withAccountIDs(array $account_ids) { | public function withAccountIDs(array $account_ids) { | ||||
$this->accountIDs = $account_ids; | $this->accountIDs = $account_ids; | ||||
Show All 25 Lines | public function withAccountSecrets(array $secrets) { | ||||
return $this; | return $this; | ||||
} | } | ||||
public function needImages($need) { | public function needImages($need) { | ||||
$this->needImages = $need; | $this->needImages = $need; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function withProviderConfigPHIDs(array $phids) { | |||||
$this->providerConfigPHIDs = $phids; | |||||
return $this; | |||||
} | |||||
public function newResultObject() { | public function newResultObject() { | ||||
return new PhabricatorExternalAccount(); | return new PhabricatorExternalAccount(); | ||||
} | } | ||||
protected function loadPage() { | protected function loadPage() { | ||||
return $this->loadStandardPage($this->newResultObject()); | return $this->loadStandardPage($this->newResultObject()); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { | ||||
if ($this->accountSecrets !== null) { | if ($this->accountSecrets !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'accountSecret IN (%Ls)', | 'accountSecret IN (%Ls)', | ||||
$this->accountSecrets); | $this->accountSecrets); | ||||
} | } | ||||
if ($this->providerConfigPHIDs !== null) { | |||||
$where[] = qsprintf( | |||||
$conn, | |||||
'providerConfigPHID IN (%Ls)', | |||||
$this->providerConfigPHIDs); | |||||
} | |||||
return $where; | return $where; | ||||
} | } | ||||
public function getQueryApplicationClass() { | public function getQueryApplicationClass() { | ||||
return 'PhabricatorPeopleApplication'; | return 'PhabricatorPeopleApplication'; | ||||
} | } | ||||
} | } |