Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2989015
PhabricatorAuthProviderConfigQuery.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorAuthProviderConfigQuery.php
View Options
<?php
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
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Feb 22, 19:10 (8 h, 38 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1163791
Default Alt Text
PhabricatorAuthProviderConfigQuery.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment