Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3295387
PhabricatorTokenCountQuery.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
910 B
Referenced Files
None
Subscribers
None
PhabricatorTokenCountQuery.php
View Options
<?php
final
class
PhabricatorTokenCountQuery
extends
PhabricatorOffsetPagedQuery
{
private
$objectPHIDs
;
public
function
withObjectPHIDs
(
array
$object_phids
)
{
$this
->
objectPHIDs
=
$object_phids
;
return
$this
;
}
public
function
execute
(
)
{
$table
=
new
PhabricatorTokenCount
(
)
;
$conn_r
=
$table
->
establishConnection
(
'r'
)
;
$rows
=
queryfx_all
(
$conn_r
,
'SELECT objectPHID, tokenCount FROM %T %Q %Q'
,
$table
->
getTableName
(
)
,
$this
->
buildWhereClause
(
$conn_r
)
,
$this
->
buildLimitClause
(
$conn_r
)
)
;
return
ipull
(
$rows
,
'tokenCount'
,
'objectPHID'
)
;
}
protected
function
buildWhereClause
(
AphrontDatabaseConnection
$conn
)
{
$where
=
array
(
)
;
if
(
$this
->
objectPHIDs
)
{
$where
[
]
=
qsprintf
(
$conn
,
'objectPHID IN (%Ls)'
,
$this
->
objectPHIDs
)
;
}
return
$this
->
formatWhereClause
(
$conn
,
$where
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Mar 27, 01:57 (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1164532
Default Alt Text
PhabricatorTokenCountQuery.php (910 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment