Application class of Roundcube Webmail implemented as singleton
package |
Webmail |
---|
get_instance($mode, $env = '') : \rcube
startup()
set_task($task)
set_user($user)
get_address_book($id, $writeable = false) : \rcube_contacts
get_address_book_id($object) : string
string
Source identifier
get_address_sources($writeable = false, $skip_hidden = false) : array
array
Address books array
get_compose_responses($sorted = false, $user_only = false) : array
These are stored in local config and user preferences.
array
List of the current user's stored responses
load_gui($framed = false) : \rcube_output
This will instantiate a rcmail_output_html object and set environment vars according to the current session and configuration
\rcube_output
Reference to HTML output object
json_init() : \rcube_output
session_init()
login($username, $pass, $host = null, $cookiecheck = false) : boolean
This will also create a new user entry if auto_create_user is configured.
boolean
True on success, False on failure
login_error() : int
int
Error code
autoselect_host() : string
string
Selected IMAP host
kill_session()
logout_actions()
get_request_token() : string
string
The request token
check_request($mode = \rcube_utils::INPUT_POST) : boolean
boolean
True if request token is valid false if not
url($p) : string
string
Valid application URL
shutdown()
register_action_map(array $map)
array
Alias-to-filename hash array
get_action_file()
fix_namespace_settings(\rcube_user $user)
Old Roundcube versions were using folder names with removed namespace prefix. Now we need to add the prefix on servers where personal namespace has prefix.
overwrite_action($action)
set_env_config($options)
user_date() : string
string
Date
log_login($user = null, $failed_login = false, $error_code)
table_output($attrib, $table_data, $a_show_cols, $id_col) : string
string
HTML table code
format_date($date, $format = null, $convert = true) : string
string
Formatted date string
folder_list(array $attrib) : string
array
Named parameters
string
HTML code for the gui object
folder_selector(array $p = array()) : \html_select
build_folder_tree(&$arrFolders, $folder, $delm = '/', $path = '')
render_folder_tree_html(&$arrFolders, &$mbox_name, &$jslist, $attrib, $nestLevel)
render_folder_tree_select(&$arrFolders, &$mbox_name, $maxlength, &$select, $realnames = false, $nestLevel, $opts = array())
folder_classname($folder_id)
localize_foldername(string $name, bool $with_path = true) : string
UTF-7 decode it in case no localized text was found
string
Folder name
bool
Enable path localization
string
Localized folder name in UTF-8 encoding
localize_folderpath($path)
quota_display($attrib)
quota_content($attrib = null)
display_server_error(string $fallback = null, array $fallback_args = null, string $suffix = '')
string
Fallback message label
array
Fallback message label arguments
string
Message label suffix
html_editor(string $mode = '')
string
Editor mode
replace_emoticons(string $html) : string
string
HTML content
string
HTML content
upload_progress()
upload_init()
autocomplete_init()
font_defs(string $font = null)
string
Font name
show_bytes($bytes) : string
string
Byte string
imap_connect()
imap_init()
storage_connect() : bool
bool
True on success, False on error
__construct($env = '')
init($mode)
get_dbh() : \rcube_db
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!
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
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
ERROR_STORAGE
ERROR_INVALID_REQUEST
ERROR_INVALID_HOST
ERROR_COOKIES_DISABLED
INIT_WITH_DB
INIT_WITH_PLUGINS
main_tasks : array
var | |
---|---|
array
task : string
var | |
---|---|
string
action : string
var | |
---|---|
string
comm_path :
filename :
address_books :
action_map :
memcache : \Memcache
var | |
---|---|
\Memcache
texts :
caches :
shutdown_functions :