Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F950308
ConpherenceParticipantQuery.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
ConpherenceParticipantQuery.php
View Options
<?php
final
class
ConpherenceParticipantQuery
extends
PhabricatorOffsetPagedQuery
{
private
$participantPHIDs
;
public
function
withParticipantPHIDs
(
array
$phids
)
{
$this
->
participantPHIDs
=
$phids
;
return
$this
;
}
public
function
execute
()
{
$table
=
new
ConpherenceParticipant
();
$thread
=
new
ConpherenceThread
();
$conn
=
$table
->
establishConnection
(
'r'
);
$data
=
queryfx_all
(
$conn
,
'SELECT * FROM %T participant JOIN %T thread
ON participant.conpherencePHID = thread.phid %Q %Q %Q'
,
$table
->
getTableName
(),
$thread
->
getTableName
(),
$this
->
buildWhereClause
(
$conn
),
$this
->
buildOrderClause
(
$conn
),
$this
->
buildLimitClause
(
$conn
));
return
$table
->
loadAllFromArray
(
$data
);
}
protected
function
buildWhereClause
(
AphrontDatabaseConnection
$conn
)
{
$where
=
array
();
if
(
$this
->
participantPHIDs
!==
null
)
{
$where
[]
=
qsprintf
(
$conn
,
'participantPHID IN (%Ls)'
,
$this
->
participantPHIDs
);
}
return
$this
->
formatWhereClause
(
$conn
,
$where
);
}
private
function
buildOrderClause
(
AphrontDatabaseConnection
$conn
)
{
return
qsprintf
(
$conn
,
'ORDER BY thread.dateModified DESC, thread.id DESC, participant.id DESC'
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Jun 17, 2:02 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
224967
Default Alt Text
ConpherenceParticipantQuery.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment