rcube_config

Configuration class for Roundcube

package

Framework

subpackage

Core

Methods

Object constructor

__construct($env = '') 

Arguments

$env

Load config from local config file

load() 
todo

Remove global $CONFIG

Load a host-specific config file if configured This will merge the host specific configuration with the given one

load_host_config() 

Read configuration from a file and merge with the already stored config values

load_from_file(string $file) : \booelan

Arguments

$file

string

Name of the config file to be loaded

Response

\booelan

True on success, false on failure

Helper method to resolve absolute paths to the given config file.

resolve_paths($file, $use_env = true) : array

This also takes the 'env' property into account.

Arguments

$file

$use_env

Response

array

List of candidates in config dir path(s)

Determine whether the given file path is absolute or relative

_is_absolute($path) 

Arguments

$path

Getter for a specific config parameter

get(string $name, mixed $def = null) : mixed

Arguments

$name

string

Parameter name

$def

mixed

Default value if not set

Response

mixed

The requested config value

Setter for a config parameter

set(string $name, mixed $value) 

Arguments

$name

string

Parameter name

$value

mixed

Parameter value

Override config options with the given values (eg. user prefs)

merge(array $prefs) 

Arguments

$prefs

array

Hash array with config props to merge over

Merge the given prefs over the current config and make sure that they survive further merging.

set_user_prefs(array $prefs) 

Arguments

$prefs

array

Hash array with user prefs

Getter for all config options

all() : array

Response

array

Hash array containing all config properties

Special getter for user's timezone offset including DST

get_timezone() : float
deprecated

Response

float

Timezone offset (in hours)

Return requested DES crypto key.

get_crypto_key(string $key) : string

Arguments

$key

string

Crypto key name

Response

string

Crypto key

Try to autodetect operating system and find the correct line endings

header_delimiter() : string

Response

string

The appropriate mail header delimiter

Return the mail domain configured for the given host

mail_domain(string $host, boolean $encode = true) : string

Arguments

$host

string

IMAP host

$encode

boolean

If true, domain name will be converted to IDN ASCII

Response

string

Resolved SMTP host

Getter for error state

get_error() : mixed

Response

mixed

Error message on error, False if no errors

Internal getter for client's (browser) timezone identifier

client_timezone() 

Convert legacy options into new ones

fix_legacy_props(array $props) : array

Arguments

$props

array

Hash array with config props

Response

array

Converted config props

timezone_name_from_abbr() replacement. Converts timezone offset into timezone name abbreviation.

timezone_name_from_abbr(float $offset) : string
static

Arguments

$offset

float

Timezone offset (in hours)

Response

string

Timezone abbreviation

Constants

DEFAULT_SKIN

DEFAULT_SKIN

Properties

env

env : 

paths

paths : 

prop

prop : 

errors

errors : 

userprefs

userprefs : 

Renamed options

legacy_props : array
var

Type(s)

array