Reading Configuration
- public static function getEnvConfig($key) — Get the current configuration setting for a given key.
- public static function getEnvConfigIfExists($key, $default) — Get the current configuration setting for a given key. If the key does not exist, return a default value instead of throwing. This is primarily useful for migrations involving keys which are slated for removal.
- public static function getURI($path) — Get the fully-qualified URI for a path.
- public static function getProductionURI($path) — Get the fully-qualified production URI for a path.
- public static function getCDNURI($path) — Get the fully-qualified production URI for a static resource path.
- public static function getDoclink($resource, $type) — Get the fully-qualified production URI for a documentation resource.
- public static function newObjectFromConfig($key, $args) — Build a concrete object from a configuration key.
URI Validation
- public static function isValidURIForLink($uri) — Detect if a URI satisfies either @{method:isValidLocalURIForLink} or @{method:isValidRemoteURIForLink}, i.e. is a page on this server or the URI of some other resource which has a valid protocol. This rejects garbage URIs and URIs with protocols which do not appear in the `uri.allowed-protocols` configuration, notably 'javascript:' URIs.
- public static function isValidLocalURIForLink($uri) — Detect if a URI identifies some page on this server.
- public static function isValidRemoteURIForLink($uri) — Detect if a URI identifies some valid linkable remote resource.
- public static function requireValidRemoteURIForLink($raw_uri) — Detect if a URI identifies a valid linkable remote resource, throwing a detailed message if it does not.
- public static function isValidRemoteURIForFetch($uri, $protocols) — Detect if a URI identifies a valid fetchable remote resource.
- public static function requireValidRemoteURIForFetch($raw_uri, $protocols) — Detect if a URI identifies a valid fetchable remote resource, throwing a detailed message if it does not.
Unit Test Support
- public static function beginScopedEnv()
- private static function pushTestEnvironment()
- public static function popTestEnvironment($key)
Internals
- public static function envConfigExists($key)
- public static function getAllConfigKeys()
- public static function overrideTestEnvConfig($stack_key, $key, $value)
Other Methods
- public function __get($name)
- public function __set($name, $value)
- public function current()
- public function key()
- public function next()
- public function rewind()
- public function valid()
- private function throwOnAttemptedIteration()
- public function getPhobjectClassConstant($key, $byte_limit) — Read the value of a class constant.
- public static function initializeWebEnvironment()
- public static function initializeScriptEnvironment($config_optional)
- private static function initializeCommonEnvironment($config_optional)
- public static function beginScopedLocale($locale_code)
- public static function getLocaleCode()
- public static function setLocaleCode($locale_code)
- private static function buildConfigurationSourceStack($config_optional)
- public static function repairConfig($key, $value)
- public static function overrideConfig($key, $value)
- public static function getUnrepairedEnvConfig($key, $default)
- public static function getSelectedEnvironmentName()
- public static function isSelfURI($raw_uri)
- private static function getSelfURIMap()
- public static function getAnyBaseURI()
- public static function getRequestBaseURI()
- public static function setRequestBaseURI($uri)
- public static function isReadOnly()
- public static function setReadOnly($read_only, $reason)
- public static function getReadOnlyMessage()
- public static function getReadOnlyURI()
- public static function getReadOnlyReason()
- public static function isBlacklistedOutboundAddress($address) — Determine if an IP address is in the outbound address blacklist.
- public static function isClusterRemoteAddress()
- public static function isClusterAddress($address)
- public static function getRemoteAddress()
- public static function getConfigSourceStack()
- private static function dropConfigCache()
- private static function resetUmask()
- public static function getEmptyCWD() — Get the path to an empty directory which is readable by all of the system user accounts that Phabricator acts as.