Base class of the Roundcube Framework implemented as singleton
package |
Framework |
---|---|
subpackage |
Core |
get_instance($mode, $env = '') : \rcube
__construct($env = '')
init($mode)
get_memcache() : object
object
Memcache
memcache_failure($host, $port)
get_cache(string $name, string $type = 'db', string $ttl, bool $packed = true) : \rcube_cache
string
Cache identifier
string
Cache type ('db', 'apc' or 'memcache')
string
Expiration time for cache items
bool
Enables/disables data serialization
\rcube_cache
Cache object
get_cache_shared(string $name, bool $packed = true) : \rcube_cache_shared
string
Cache identifier
bool
Enables/disables data serialization
\rcube_cache_shared
Cache object
smtp_init($connect = false)
get_storage() : \rcube_storage
storage_init()
set_storage_prop()
This must be done AFTER connecting to the server!
session_init()
gc()
gc_temp()
Remove temp files older than two days
gc_run()
gettext(mixed $attrib, string $domain = null) : string
mixed
Named parameters array or label name
string
Label domain (plugin) name
string
Localized text
text_exists(string $name, string $domain = null, string &$ref_domain = null) : boolean
string
Label name
string
Label domain (plugin) name or '*' for all domains
string
Sets domain name if label is found
boolean
True if text exists (either in the current language or in en_US)
load_language(string $lang = null, array $add = array(), array $merge = array())
string
Language ID
array
Additional text labels/messages
array
Additional text labels/messages to merge
language_prop($lang) : string
string
Valid language code
list_languages() : array
array
List of available localizations
encrypt(string $clear, string $key = 'des_key', boolean $base64 = true) : string
string
clear text input
string
encryption key to retrieve from the configuration, defaults to 'des_key'
boolean
whether or not to base64_encode() the result before returning
string
encrypted text
decrypt(string $cipher, string $key = 'des_key', boolean $base64 = true) : string
string
encrypted text
string
encryption key to retrieve from the configuration, defaults to 'des_key'
boolean
whether or not input is base64-encoded
string
decrypted text
create_iv($size) : string
string
Vector string
url($p) : string
string
Valid application URL
shutdown()
add_shutdown_function($function)
The functions will be executed before destroying any objects like smtp, imap, session, etc.
Q($str, $mode = 'strict', $newlines = true) : string
Shortcut function for rcube_utils::rep_specialchars_output()
string
HTML-quoted string
JQ($str) : string
Shortcut function for rcube_utils::rep_specialchars_output()
string
JS-quoted string
exec() : \output
Keywords {keyword} are replaced with arguments
\output
of command. shell errors not detectable
console()
write_log(mixed $name, $line)
Date will be added automatically to the line.
mixed
name of log file
raise_error($arg = array(), $log = false, $terminate = false)
log_bug($arg_arr)
see | self::raise_error() |
---|---|
timer() : float
float
Current time in seconds since the Unix
print_timer(float $timer, string $label = 'Timer', string $dest = 'console')
see | self::timer() |
---|---|
float
Timer (self::timer() result)
string
Log line prefix
string
Log file name
get_user_id() : mixed
mixed
User identifier
get_user_name() : string
string
User name
get_user_email() : string
string
User email address
get_user_password() : string
string
User password
get_user_log_dir()
get_user_language() : string
string
User language code
INIT_WITH_DB
INIT_WITH_PLUGINS
memcache : \Memcache
var | |
---|---|
\Memcache
texts :
caches :
shutdown_functions :