Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/issue/PhabricatorSetupIssue.php
| Show All 10 Lines | final class PhabricatorSetupIssue { | ||||
| private $isIgnored = false; | private $isIgnored = false; | ||||
| private $phpExtensions = array(); | private $phpExtensions = array(); | ||||
| private $phabricatorConfig = array(); | private $phabricatorConfig = array(); | ||||
| private $relatedPhabricatorConfig = array(); | private $relatedPhabricatorConfig = array(); | ||||
| private $phpConfig = array(); | private $phpConfig = array(); | ||||
| private $commands = array(); | private $commands = array(); | ||||
| private $mysqlConfig = array(); | private $mysqlConfig = array(); | ||||
| private $originalPHPConfigValues = array(); | |||||
| public function addCommand($command) { | public function addCommand($command) { | ||||
| $this->commands[] = $command; | $this->commands[] = $command; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getCommands() { | public function getCommands() { | ||||
| return $this->commands; | return $this->commands; | ||||
| ▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | public function getIsFatal() { | ||||
| return $this->isFatal; | return $this->isFatal; | ||||
| } | } | ||||
| public function addPHPConfig($php_config) { | public function addPHPConfig($php_config) { | ||||
| $this->phpConfig[] = $php_config; | $this->phpConfig[] = $php_config; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| /** | |||||
| * Set an explicit value to display when showing the user PHP configuration | |||||
| * values. | |||||
| * | |||||
| * If Phabricator has changed a value by the time a config issue is raised, | |||||
| * you can provide the original value here so the UI makes sense. For example, | |||||
| * we alter `memory_limit` during startup, so if the original value is not | |||||
| * provided it will look like it is always set to `-1`. | |||||
| * | |||||
| * @param string PHP configuration option to provide a value for. | |||||
| * @param string Explicit value to show in the UI. | |||||
| * @return this | |||||
| */ | |||||
| public function addPHPConfigOriginalValue($php_config, $value) { | |||||
| $this->originalPHPConfigValues[$php_config] = $value; | |||||
| return $this; | |||||
| } | |||||
| public function getPHPConfigOriginalValue($php_config, $default = null) { | |||||
| return idx($this->originalPHPConfigValues, $php_config, $default); | |||||
| } | |||||
| public function getPHPConfig() { | public function getPHPConfig() { | ||||
| return $this->phpConfig; | return $this->phpConfig; | ||||
| } | } | ||||
| public function addMySQLConfig($mysql_config) { | public function addMySQLConfig($mysql_config) { | ||||
| $this->mysqlConfig[] = $mysql_config; | $this->mysqlConfig[] = $mysql_config; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines | |||||