2012-10-10 19:18:23 +02:00
|
|
|
<?php
|
|
|
|
|
2012-10-23 01:25:31 +02:00
|
|
|
abstract class PhabricatorEditor extends Phobject {
|
2012-10-10 19:18:23 +02:00
|
|
|
|
|
|
|
private $actor;
|
|
|
|
private $excludeMailRecipientPHIDs = array();
|
|
|
|
|
2012-10-23 01:25:31 +02:00
|
|
|
final public function setActor(PhabricatorUser $actor) {
|
|
|
|
$this->actor = $actor;
|
2012-10-10 19:18:23 +02:00
|
|
|
return $this;
|
|
|
|
}
|
2012-10-23 01:25:31 +02:00
|
|
|
|
2013-09-25 22:44:14 +02:00
|
|
|
final public function getActor() {
|
2012-10-23 01:25:31 +02:00
|
|
|
return $this->actor;
|
2012-10-10 19:18:23 +02:00
|
|
|
}
|
2012-10-23 01:25:31 +02:00
|
|
|
|
2013-09-25 22:44:14 +02:00
|
|
|
final public function requireActor() {
|
2012-10-10 19:18:23 +02:00
|
|
|
$actor = $this->getActor();
|
|
|
|
if (!$actor) {
|
2015-06-09 15:06:52 +02:00
|
|
|
throw new PhutilInvalidStateException('setActor');
|
2012-10-10 19:18:23 +02:00
|
|
|
}
|
|
|
|
return $actor;
|
|
|
|
}
|
|
|
|
|
|
|
|
final public function setExcludeMailRecipientPHIDs($phids) {
|
|
|
|
$this->excludeMailRecipientPHIDs = $phids;
|
|
|
|
return $this;
|
|
|
|
}
|
2012-10-23 01:25:31 +02:00
|
|
|
|
2012-10-10 19:18:23 +02:00
|
|
|
final protected function getExcludeMailRecipientPHIDs() {
|
|
|
|
return $this->excludeMailRecipientPHIDs;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|