Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/option/PhabricatorConfigOption.php
| Show First 20 Lines • Show All 181 Lines • ▼ Show 20 Lines | final class PhabricatorConfigOption | ||||
| public function isCustomType() { | public function isCustomType() { | ||||
| return !strncmp($this->getType(), 'custom:', 7); | return !strncmp($this->getType(), 'custom:', 7); | ||||
| } | } | ||||
| public function getCustomObject() { | public function getCustomObject() { | ||||
| if (!$this->customObject) { | if (!$this->customObject) { | ||||
| if (!$this->isCustomType()) { | if (!$this->isCustomType()) { | ||||
| throw new Exception("This option does not have a custom type!"); | throw new Exception('This option does not have a custom type!'); | ||||
| } | } | ||||
| $this->customObject = newv(substr($this->getType(), 7), array()); | $this->customObject = newv(substr($this->getType(), 7), array()); | ||||
| } | } | ||||
| return $this->customObject; | return $this->customObject; | ||||
| } | } | ||||
| public function getCustomData() { | public function getCustomData() { | ||||
| return $this->customData; | return $this->customData; | ||||
| ▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines | |||||