1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-22 18:28:47 +02:00
phorge-phorge/src/applications/conpherence/storage/ConpherenceParticipant.php

42 lines
1,002 B
PHP
Raw Normal View History

<?php
/**
* @group conpherence
*/
final class ConpherenceParticipant extends ConpherenceDAO {
protected $participantPHID;
protected $conpherencePHID;
protected $participationStatus;
protected $behindTransactionPHID;
protected $dateTouched;
protected $settings = array();
public function getConfiguration() {
return array(
self::CONFIG_SERIALIZATION => array(
'settings' => self::SERIALIZATION_JSON,
),
) + parent::getConfiguration();
}
public function getSettings() {
return nonempty($this->settings, array());
}
public function markUpToDate(ConpherenceTransaction $xaction) {
if (!$this->isUpToDate()) {
$this->setParticipationStatus(ConpherenceParticipationStatus::UP_TO_DATE);
$this->setBehindTransactionPHID($xaction->getPHID());
$this->save();
}
return $this;
}
public function isUpToDate() {
return $this->getParticipationStatus() ==
ConpherenceParticipationStatus::UP_TO_DATE;
}
}