Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/setting/PhabricatorSetting.php
| <?php | <?php | ||||
| abstract class PhabricatorSetting extends Phobject { | abstract class PhabricatorSetting extends Phobject { | ||||
| private $viewer; | private $viewer = false; | ||||
| public function setViewer(PhabricatorUser $viewer) { | public function setViewer(PhabricatorUser $viewer = null) { | ||||
| $this->viewer = $viewer; | $this->viewer = $viewer; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getViewer() { | public function getViewer() { | ||||
| if ($this->viewer === false) { | |||||
| throw new PhutilInvalidStateException('setViewer'); | |||||
| } | |||||
| return $this->viewer; | return $this->viewer; | ||||
| } | } | ||||
| abstract public function getSettingName(); | abstract public function getSettingName(); | ||||
| public function getSettingPanelKey() { | public function getSettingPanelKey() { | ||||
| return null; | return null; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines | |||||