[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/infrastructure/env/ -> PhabricatorEnv.php (summary)

Manages the execution environment configuration, exposing APIs to read configuration settings and other similar values that are derived directly from configuration settings. = Reading Configuration =

File Size: 582 lines (17 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 31 functions

  initializeWebEnvironment()
  initializeScriptEnvironment()
  initializeCommonEnvironment()
  buildConfigurationSourceStack()
  repairConfig()
  overrideConfig()
  getUnrepairedEnvConfig()
  getSelectedEnvironmentName()
  calculateEnvironmentHash()
  getEnvConfig()
  getEnvConfigIfExists()
  getURI()
  getProductionURI()
  getAllowedURIs()
  getCDNURI()
  getDoclink()
  newObjectFromConfig()
  getAnyBaseURI()
  getRequestBaseURI()
  setRequestBaseURI()
  beginScopedEnv()
  pushTestEnvironment()
  popTestEnvironment()
  isValidWebResource()
  isValidLocalWebResource()
  isValidRemoteWebResource()
  envConfigExists()
  getAllConfigKeys()
  getConfigSourceStack()
  overrideTestEnvConfig()
  dropConfigCache()

Functions
Functions that are not part of a class:

initializeWebEnvironment()   X-Ref


initializeScriptEnvironment()   X-Ref
No description

initializeCommonEnvironment()   X-Ref
No description

buildConfigurationSourceStack()   X-Ref
No description

repairConfig($key, $value)   X-Ref
No description

overrideConfig($key, $value)   X-Ref
No description

getUnrepairedEnvConfig($key, $default = null)   X-Ref
No description

getSelectedEnvironmentName()   X-Ref
No description

calculateEnvironmentHash()   X-Ref
No description

getEnvConfig($key)   X-Ref
Get the current configuration setting for a given key.

If the key is not found, then throw an Exception.


getEnvConfigIfExists($key, $default = null)   X-Ref
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.


getURI($path)   X-Ref
Get the fully-qualified URI for a path.


getProductionURI($path)   X-Ref
Get the fully-qualified production URI for a path.


getAllowedURIs($path)   X-Ref
No description

getCDNURI($path)   X-Ref
Get the fully-qualified production URI for a static resource path.


getDoclink($resource, $type = 'article')   X-Ref
Get the fully-qualified production URI for a documentation resource.


newObjectFromConfig($key, $args = array()   X-Ref
Build a concrete object from a configuration key.


getAnyBaseURI()   X-Ref
No description

getRequestBaseURI()   X-Ref
No description

setRequestBaseURI($uri)   X-Ref
No description

beginScopedEnv()   X-Ref


pushTestEnvironment()   X-Ref


popTestEnvironment($key)   X-Ref


isValidWebResource($uri)   X-Ref
Detect if a URI satisfies either @{method:isValidLocalWebResource} or
@{method:isValidRemoteWebResource}, 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.

NOTE: This method is generally intended to reject URIs which it may be
unsafe to put in an "href" link attribute.

param: string URI to test.
return: bool True if the URI identifies a web resource.

isValidLocalWebResource($uri)   X-Ref
Detect if a URI identifies some page on this server.

NOTE: This method is generally intended to reject URIs which it may be
unsafe to issue a "Location:" redirect to.

param: string URI to test.
return: bool True if the URI identifies a local page.

isValidRemoteWebResource($uri)   X-Ref
Detect if a URI identifies some valid remote resource.

param: string URI to test.
return: bool True if a URI idenfies a remote resource with an allowed

envConfigExists($key)   X-Ref


getAllConfigKeys()   X-Ref


getConfigSourceStack()   X-Ref
No description

overrideTestEnvConfig($stack_key, $key, $value)   X-Ref


dropConfigCache()   X-Ref
No description



Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1