Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/env/PhabricatorEnv.php
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | |||||
final class PhabricatorEnv extends Phobject { | final class PhabricatorEnv extends Phobject { | ||||
private static $sourceStack; | private static $sourceStack; | ||||
private static $repairSource; | private static $repairSource; | ||||
private static $overrideSource; | private static $overrideSource; | ||||
private static $requestBaseURI; | private static $requestBaseURI; | ||||
private static $cache; | private static $cache; | ||||
private static $localeCode; | private static $localeCode; | ||||
private static $readOnly; | |||||
/** | /** | ||||
* @phutil-external-symbol class PhabricatorStartup | * @phutil-external-symbol class PhabricatorStartup | ||||
*/ | */ | ||||
public static function initializeWebEnvironment() { | public static function initializeWebEnvironment() { | ||||
self::initializeCommonEnvironment(); | self::initializeCommonEnvironment(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 367 Lines • ▼ Show 20 Lines | /* -( Reading Configuration )---------------------------------------------- */ | ||||
public static function getRequestBaseURI() { | public static function getRequestBaseURI() { | ||||
return self::$requestBaseURI; | return self::$requestBaseURI; | ||||
} | } | ||||
public static function setRequestBaseURI($uri) { | public static function setRequestBaseURI($uri) { | ||||
self::$requestBaseURI = $uri; | self::$requestBaseURI = $uri; | ||||
} | } | ||||
public static function isReadOnly() { | |||||
if (self::$readOnly !== null) { | |||||
return self::$readOnly; | |||||
} | |||||
return self::getEnvConfig('cluster.read-only'); | |||||
} | |||||
public static function setReadOnly($read_only) { | |||||
self::$readOnly = $read_only; | |||||
} | |||||
/* -( Unit Test Support )-------------------------------------------------- */ | /* -( Unit Test Support )-------------------------------------------------- */ | ||||
/** | /** | ||||
* @task test | * @task test | ||||
*/ | */ | ||||
public static function beginScopedEnv() { | public static function beginScopedEnv() { | ||||
return new PhabricatorScopedEnv(self::pushTestEnvironment()); | return new PhabricatorScopedEnv(self::pushTestEnvironment()); | ||||
▲ Show 20 Lines • Show All 346 Lines • Show Last 20 Lines |