Construct shell command, execute it and return output as string.
Keywords {keyword} are replaced with arguments
output
exec
($cmd 0, $values 1)
-
$cmd
0: Format string with {keywords} to be replaced
-
$values
1: (zero, one or more arrays can be passed)
This implements the 'singleton' design pattern
Helper method to set a cookie with the current path and host settings
void
setcookie
(string $name, string $value, [string $exp = 0])
-
string
$name: Cookie name
-
string
$value: Cookie value
-
string
$exp: Expiration time
Registers shutdown function to be executed on shutdown.
The functions will be executed before destroying any objects like smtp, imap, session, etc.
void
add_shutdown_function
(callback $function)
-
callback
$function: Function callback
Auto-select IMAP host based on the posted login information
string
autoselect_host
()
Garbage collector for cache entries.
Set flag to expunge caches on shutdown
void
cache_gc
()
Check if the current request contains a valid token
boolean
check_request
([int $mode = RCUBE_INPUT_POST])
-
int
$mode: Request method
Decrypt 3DES-encrypted string
string
decrypt
(string $cipher, [string $key = 'des_key'], [boolean $base64 = true])
-
string
$cipher: encrypted text
-
string
$key: encryption key to retrieve from the configuration, defaults to 'des_key'
-
boolean
$base64: whether or not input is base64-encoded
Encrypt using 3DES
string
encrypt
(string $clear, [string $key = 'des_key'], [boolean $base64 = true])
-
string
$clear: clear text input
-
string
$key: encryption key to retrieve from the configuration, defaults to 'des_key'
-
boolean
$base64: whether or not to base64_encode() the result before returning
Get localized text in the desired language
string
gettext
(mixed $attrib, [string $domain = null])
-
mixed
$attrib: Named parameters array or label name
-
string
$domain: Label domain (plugin) name
Returns current action filename
void
get_action_file
(array $map)
-
array
$map: Alias-to-filename hash array
Return instance of the internal address book class
rcube_contacts
get_address_book
(
string $id, [
boolean $writeable =
false])
-
string
$id: Address book identifier
-
boolean
$writeable: True if the address book needs to be writeable
Return address books list
array
get_address_sources
([boolean $writeable = false])
-
boolean
$writeable: True if the address book needs to be writeable
Initialize and get cache object
rcube_cache
get_cache
(
string $name, [
string $type =
'db'], [
int $ttl =
0], [
bool $packed =
true])
-
string
$name: Cache identifier
-
string
$type: Cache type ('db', 'apc' or 'memcache')
-
int
$ttl: Expiration time for cache items in seconds
-
bool
$packed: Enables/disables data serialization
Get the current database connection
Get global handle for memcache access
object Memcache
get_memcache
()
Generate a unique token to be used in a form request
string
get_request_token
()
Initialize and get storage object
Connect to the IMAP server with stored session data.
bool
imap_connect
()
Initialize IMAP object.
void
imap_init
()
Create an output object for JSON responses
Destroy session data and remove cookie
void
kill_session
()
Read directory program/localization and return a list of available languages
array
list_languages
()
Init output object for GUI and add common scripts.
This will instantiate a rcmail_template object and set environment vars according to the current session and configuration
-
boolean
$framed: True if this request is loaded in a (i)frame
Load a localization package
void
load_language
([string $lang = null], [ $add = array()])
-
string
$lang: Language ID
-
$add
Perfom login to the mail server and to the webmail service.
This will also create a new user entry if auto_create_user is configured.
boolean
login
(string $username, string $pass, [string $host = NULL])
-
string
$username: Mail storage (IMAP) user name
-
string
$pass: Mail storage (IMAP) password
-
string
$host: Mail storage (IMAP) host
Do server side actions on logout
void
logout_actions
()
Callback for memcache failure
void
memcache_failure
( $host, $port)
Registers action aliases for current task
void
register_action_map
(array $map)
-
array
$map: Alias-to-filename hash array
Configure session object internals
void
session_configure
()
Create session object and start the session.
void
session_init
()
Setter for application task
void
set_task
(string $task)
-
string
$task: Task to set
Setter for system user object
Function to be executed in script shutdown
Registered with register_shutdown_function()
void
shutdown
()
Create SMTP object and connect to server
void
smtp_init
([boolean $connect = false])
-
boolean
$connect: True if connection should be established
Connect to the mail storage server with stored session data
bool
storage_connect
()
Initialize storage object
void
storage_init
()
Check if the given text label exists
boolean
text_exists
(string $name, [string $domain = null], [ &$ref_domain = null], string $ref_domain)
-
string
$name: Label name
-
string
$domain: Label domain (plugin) name or '*' for all domains
-
string
$ref_domain: Sets domain name if label is found
-
&$ref_domain
Build a valid URL to this instance of Roundcube
string
url
(mixed $p)
-
mixed
$p: Either a string with the action or url parameters as key-value pairs