Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120092829
PhabricatorOAuthClientAuthorizationQuery.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jul 1, 21:38
Size
1003 B
Mime Type
text/x-php
Expires
Thu, Jul 3, 21:38 (2 d)
Engine
blob
Format
Raw Data
Handle
27102476
Attached To
rPH Phabricator
PhabricatorOAuthClientAuthorizationQuery.php
View Options
<?php
final
class
PhabricatorOAuthClientAuthorizationQuery
extends
PhabricatorOffsetPagedQuery
{
private
$userPHIDs
;
public
function
withUserPHIDs
(
array
$phids
)
{
$this
->
userPHIDs
=
$phids
;
return
$this
;
}
private
function
getUserPHIDs
()
{
return
$this
->
userPHIDs
;
}
public
function
execute
()
{
$table
=
new
PhabricatorOAuthClientAuthorization
();
$conn_r
=
$table
->
establishConnection
(
'r'
);
$where_clause
=
$this
->
buildWhereClause
(
$conn_r
);
$limit_clause
=
$this
->
buildLimitClause
(
$conn_r
);
$data
=
queryfx_all
(
$conn_r
,
'SELECT * FROM %T auth %Q %Q'
,
$table
->
getTableName
(),
$where_clause
,
$limit_clause
);
return
$table
->
loadAllFromArray
(
$data
);
}
private
function
buildWhereClause
(
$conn_r
)
{
$where
=
array
();
if
(
$this
->
getUserPHIDs
())
{
$where
[]
=
qsprintf
(
$conn_r
,
'userPHID IN (%Ls)'
,
$this
->
getUserPHIDs
());
}
return
$this
->
formatWhereClause
(
$where
);
}
}
Event Timeline
Log In to Comment