Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialReviewer.php
<?php | <?php | ||||
final class DifferentialReviewer | final class DifferentialReviewer | ||||
extends DifferentialDAO { | extends DifferentialDAO { | ||||
protected $revisionPHID; | protected $revisionPHID; | ||||
protected $reviewerPHID; | protected $reviewerPHID; | ||||
protected $reviewerStatus; | protected $reviewerStatus; | ||||
protected $lastActionDiffPHID; | protected $lastActionDiffPHID; | ||||
protected $lastCommentDiffPHID; | protected $lastCommentDiffPHID; | ||||
protected $lastActorPHID; | protected $lastActorPHID; | ||||
protected $voidedPHID; | protected $voidedPHID; | ||||
private $authority = array(); | private $authority = array(); | ||||
private $changesets = self::ATTACHABLE; | |||||
protected function getConfiguration() { | protected function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
'reviewerStatus' => 'text64', | 'reviewerStatus' => 'text64', | ||||
'lastActionDiffPHID' => 'phid?', | 'lastActionDiffPHID' => 'phid?', | ||||
'lastCommentDiffPHID' => 'phid?', | 'lastCommentDiffPHID' => 'phid?', | ||||
'lastActorPHID' => 'phid?', | 'lastActorPHID' => 'phid?', | ||||
Show All 26 Lines | public function attachAuthority(PhabricatorUser $user, $has_authority) { | ||||
return $this; | return $this; | ||||
} | } | ||||
public function hasAuthority(PhabricatorUser $viewer) { | public function hasAuthority(PhabricatorUser $viewer) { | ||||
$cache_fragment = $viewer->getCacheFragment(); | $cache_fragment = $viewer->getCacheFragment(); | ||||
return $this->assertAttachedKey($this->authority, $cache_fragment); | return $this->assertAttachedKey($this->authority, $cache_fragment); | ||||
} | } | ||||
public function attachChangesets(array $changesets) { | |||||
$this->changesets = $changesets; | |||||
return $this; | |||||
} | |||||
public function getChangesets() { | |||||
return $this->assertAttached($this->changesets); | |||||
} | |||||
public function isResigned() { | public function isResigned() { | ||||
$status_resigned = DifferentialReviewerStatus::STATUS_RESIGNED; | $status_resigned = DifferentialReviewerStatus::STATUS_RESIGNED; | ||||
return ($this->getReviewerStatus() == $status_resigned); | return ($this->getReviewerStatus() == $status_resigned); | ||||
} | } | ||||
public function isRejected($diff_phid) { | public function isRejected($diff_phid) { | ||||
$status_rejected = DifferentialReviewerStatus::STATUS_REJECTED; | $status_rejected = DifferentialReviewerStatus::STATUS_REJECTED; | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |