Configuration class for Roundcube
| package |
Framework |
|---|---|
| subpackage |
Core |
__construct(string $env = '')
stringEnvironment suffix for config files to load
all() : array
arrayHash array containing all config properties
client_timezone()
fix_legacy_props(array $props) : array
arrayHash array with config props
arrayConverted config props
get(string $name, mixed $def = null) : mixed
stringParameter name
mixedDefault value if not set
mixedThe requested config value
get_crypto_key(string $key) : string
stringCrypto key name
stringCrypto key
get_crypto_method() : string
stringCrypto method
get_error() : mixed
mixedError message on error, False if no errors
get_timezone() : float
| deprecated | |
|---|---|
floatTimezone offset (in hours)
getenv_default(string $varname, mixed $default_value, string $type = null) : \Value
| brief |
Get environment variable value. Retrieve an environment variable's value or if it's not found, return the provided default value. |
|---|
stringEnvironment variable name
mixedDefault value to return if necessary
stringType of value to return
\Valueof the environment variable or default if not found.
guess_type(mixed $value) : \The
| brief |
Guess the type the string may fit into. Look inside the string to determine what type might be best as a container. |
|---|
mixedThe value to inspect
\Theguess at the type.
header_delimiter() : string
| deprecated |
Since 1.3 we don't use mail() |
|---|---|
stringThe appropriate mail header delimiter
load()
| todo |
Remove global $CONFIG |
|---|---|
load_from_file(string $file) : \booelan
stringName of the config file to be loaded
\booelanTrue on success, false on failure
load_host_config()
mail_domain(string $host, boolean $encode = true) : string
stringIMAP host
booleanIf true, domain name will be converted to IDN ASCII
stringResolved SMTP host
merge(array $prefs)
arrayHash array with config props to merge over
parse_env(string $string, string $type) : \Appropriately
| brief |
Parse environment variable into PHP type. Perform an appropriate parsing of the string to create the desired PHP type. |
|---|
stringString to parse into PHP type
stringType of value to return
\Appropriatelytyped interpretation of $string.
resolve_paths(string $file, boolean $use_env = true) : array
This also takes the 'env' property into account.
stringFilename or absolute file path
booleanReturn -$env file path if exists
arrayList of candidates in config dir path(s)
set(string $name, mixed $value)
stringParameter name
mixedParameter value
set_user_prefs(array $prefs)
arrayHash array with user prefs
timezone_name_from_abbr(float $offset) : string
floatTimezone offset (in hours)
stringTimezone abbreviation
DEFAULT_SKIN
env :
paths :
prop :
errors :
userprefs :
legacy_props : array
| var |
|---|
array