Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/storage/HarbormasterBuildMessage.php
<?php | <?php | ||||
/** | /** | ||||
* A message sent to an executing build target by an external system. We | * A message sent to an executing build target by an external system. We | ||||
* capture these messages and process them asynchronously to avoid race | * capture these messages and process them asynchronously to avoid race | ||||
* conditions where we receive a message before a build plan is ready to | * conditions where we receive a message before a build plan is ready to | ||||
* accept it. | * accept it. | ||||
*/ | */ | ||||
final class HarbormasterBuildMessage extends HarbormasterDAO | final class HarbormasterBuildMessage | ||||
implements PhabricatorPolicyInterface { | extends HarbormasterDAO | ||||
implements | |||||
PhabricatorPolicyInterface, | |||||
PhabricatorDestructibleInterface { | |||||
protected $authorPHID; | protected $authorPHID; | ||||
protected $receiverPHID; | protected $receiverPHID; | ||||
protected $type; | protected $type; | ||||
protected $isConsumed; | protected $isConsumed; | ||||
private $receiver = self::ATTACHABLE; | private $receiver = self::ATTACHABLE; | ||||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | return $this->getReceiver()->hasAutomaticCapability( | ||||
$capability, | $capability, | ||||
$viewer); | $viewer); | ||||
} | } | ||||
public function describeAutomaticCapability($capability) { | public function describeAutomaticCapability($capability) { | ||||
return pht('Build messages have the same policies as their receivers.'); | return pht('Build messages have the same policies as their receivers.'); | ||||
} | } | ||||
/* -( PhabricatorDestructibleInterface )----------------------------------- */ | |||||
public function destroyObjectPermanently( | |||||
PhabricatorDestructionEngine $engine) { | |||||
$this->delete(); | |||||
} | |||||
} | } |