Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96165838
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
Mon, Dec 23, 09:05
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Dec 25, 09:05 (2 d)
Engine
blob
Format
Raw Data
Handle
23136817
Attached To
rPH Phabricator
PhabricatorOAuthClientAuthorizationQuery.php
View Options
<?php
final
class
PhabricatorOAuthClientAuthorizationQuery
extends
PhabricatorCursorPagedPolicyAwareQuery
{
private
$phids
;
private
$userPHIDs
;
public
function
witHPHIDs
(
array
$phids
)
{
$this
->
phids
=
$phids
;
return
$this
;
}
public
function
withUserPHIDs
(
array
$phids
)
{
$this
->
userPHIDs
=
$phids
;
return
$this
;
}
public
function
loadPage
()
{
$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
->
phids
)
{
$where
[]
=
qsprintf
(
$conn_r
,
'phid IN (%Ls)'
,
$this
->
phids
);
}
if
(
$this
->
userPHIDs
)
{
$where
[]
=
qsprintf
(
$conn_r
,
'userPHID IN (%Ls)'
,
$this
->
userPHIDs
);
}
$where
[]
=
$this
->
buildPagingClause
(
$conn_r
);
return
$this
->
formatWhereClause
(
$where
);
}
public
function
getQueryApplicationClass
()
{
return
'PhabricatorApplicationOAuthServer'
;
}
}
Event Timeline
Log In to Comment