Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F445291
ConpherenceParticipant.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
ConpherenceParticipant.php
View Options
<?php
final
class
ConpherenceParticipant
extends
ConpherenceDAO
{
protected
$participantPHID
;
protected
$conpherencePHID
;
protected
$participationStatus
;
protected
$behindTransactionPHID
;
protected
$seenMessageCount
;
protected
$dateTouched
;
protected
$settings
=
array
();
public
function
getConfiguration
()
{
return
array
(
self
::
CONFIG_SERIALIZATION
=>
array
(
'settings'
=>
self
::
SERIALIZATION_JSON
,
),
self
::
CONFIG_COLUMN_SCHEMA
=>
array
(
'participationStatus'
=>
'uint32'
,
'dateTouched'
=>
'epoch'
,
'seenMessageCount'
=>
'uint64'
,
),
self
::
CONFIG_KEY_SCHEMA
=>
array
(
'conpherencePHID'
=>
array
(
'columns'
=>
array
(
'conpherencePHID'
,
'participantPHID'
),
),
),
)
+
parent
::
getConfiguration
();
}
public
function
getSettings
()
{
return
nonempty
(
$this
->
settings
,
array
());
}
public
function
markUpToDate
(
ConpherenceThread
$conpherence
,
ConpherenceTransaction
$xaction
)
{
if
(!
$this
->
isUpToDate
(
$conpherence
))
{
$this
->
setParticipationStatus
(
ConpherenceParticipationStatus
::
UP_TO_DATE
);
$this
->
setBehindTransactionPHID
(
$xaction
->
getPHID
());
$this
->
setSeenMessageCount
(
$conpherence
->
getMessageCount
());
$this
->
save
();
}
return
$this
;
}
private
function
isUpToDate
(
ConpherenceThread
$conpherence
)
{
return
(
$this
->
getSeenMessageCount
()
==
$conpherence
->
getMessageCount
())
&&
(
$this
->
getParticipationStatus
()
==
ConpherenceParticipationStatus
::
UP_TO_DATE
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, May 4, 1:18 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
65582
Default Alt Text
ConpherenceParticipant.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment