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