Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F467991
PhabricatorAuthFactorProviderQuery.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorAuthFactorProviderQuery.php
View Options
<?php
final
class
PhabricatorAuthFactorProviderQuery
extends
PhabricatorCursorPagedPolicyAwareQuery
{
private
$ids
;
private
$phids
;
private
$statuses
;
private
$providerFactorKeys
;
public
function
withIDs
(
array
$ids
)
{
$this
->
ids
=
$ids
;
return
$this
;
}
public
function
withPHIDs
(
array
$phids
)
{
$this
->
phids
=
$phids
;
return
$this
;
}
public
function
withProviderFactorKeys
(
array
$keys
)
{
$this
->
providerFactorKeys
=
$keys
;
return
$this
;
}
public
function
withStatuses
(
array
$statuses
)
{
$this
->
statuses
=
$statuses
;
return
$this
;
}
public
function
newResultObject
()
{
return
new
PhabricatorAuthFactorProvider
();
}
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
->
statuses
!==
null
)
{
$where
[]
=
qsprintf
(
$conn
,
'status IN (%Ls)'
,
$this
->
statuses
);
}
if
(
$this
->
providerFactorKeys
!==
null
)
{
$where
[]
=
qsprintf
(
$conn
,
'providerFactorKey IN (%Ls)'
,
$this
->
providerFactorKeys
);
}
return
$where
;
}
protected
function
willFilterPage
(
array
$providers
)
{
$map
=
PhabricatorAuthFactor
::
getAllFactors
();
foreach
(
$providers
as
$key
=>
$provider
)
{
$factor_key
=
$provider
->
getProviderFactorKey
();
$factor
=
idx
(
$map
,
$factor_key
);
if
(!
$factor
)
{
unset
(
$providers
[
$key
]);
continue
;
}
$provider
->
attachFactor
(
$factor
);
}
return
$providers
;
}
public
function
getQueryApplicationClass
()
{
return
PhabricatorAuthApplication
::
class
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 6, 4:22 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
81321
Default Alt Text
PhabricatorAuthFactorProviderQuery.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment