Base class of the Roundcube Framework implemented as singleton
| package |
Framework |
|---|---|
| subpackage |
Core |
__construct( $env = '')
add_shutdown_function(callback $function)
The functions will be executed before destroying any objects like smtp, imap, session, etc.
callbackFunction callback
check_request(integer $mode = \rcube_utils::INPUT_POST) : boolean
Empty requests aren't checked until use_secure_urls is set.
integerRequest method
booleanTrue if request token is valid false if not
console()
debug(string $engine, string $data, boolean $result = null)
stringEngine type - file name (memcache, apc)
stringData string to log
booleanOperation result
decrypt(string $cipher, string $key = 'des_key', boolean $base64 = true) : string
stringEncrypted text
stringEncryption key to retrieve from the configuration, defaults to 'des_key'
booleanWhether or not input is base64-encoded
stringDecrypted text
encrypt(string $clear, string $key = 'des_key', boolean $base64 = true) : string
stringClear text input
stringEncryption key to retrieve from the configuration, defaults to 'des_key'
booleanWhether or not to base64_encode() the result before returning
stringEncrypted text
exec() : \output
Keywords {keyword} are replaced with arguments
\outputof command. shell errors not detectable
gc()
gc_run()
gc_temp()
Remove temp files older than two days
get_cache(string $name, string $type = 'db', string $ttl, boolean $packed = true) : \rcube_cache
stringCache identifier
stringCache type ('db', 'apc' or 'memcache')
stringExpiration time for cache items
booleanEnables/disables data serialization
\rcube_cacheCache object
get_cache_shared(string $name, boolean $packed = true) : \rcube_cache_shared
stringCache identifier
booleanEnables/disables data serialization
\rcube_cache_sharedCache object
get_instance(integer $mode, string $env = '') : \rcube
integerOptions to initialize with this instance. See rcube::INITWITH* constants
stringEnvironment name to run (e.g. live, dev, test)
\rcubeThe one and only instance
get_memcache() : object
objectMemcache
get_request_token() : string
stringThe request token
get_secure_url_token(boolean $generate = false) : string|boolean
booleanGenerate token if not exists in session yet
string|booleanToken string, False when disabled
get_storage() : \rcube_storage
get_user_email() : string
stringUser email address
get_user_id() : mixed
mixedUser identifier
get_user_language() : string
stringUser language code
get_user_log_dir()
get_user_name() : string
stringUser name
get_user_password() : string
stringUser password
gettext(mixed $attrib, string $domain = null) : string
mixedNamed parameters array or label name
stringLabel domain (plugin) name
stringLocalized text
init( $mode)
JQ( $str) : string
Shortcut function for rcube_utils::rep_specialchars_output()
stringJS-quoted string
language_prop(string $lang) : string
stringLanguage code
stringValid language code
list_languages() : array
arrayList of available localizations
load_language(string $lang = null, array $add = array(), array $merge = array())
stringLanguage ID
arrayAdditional text labels/messages
arrayAdditional text labels/messages to merge
log_bug(array $arg_arr)
memcache_failure( $host, $port)
memcache_init() : object
objectMemcache
print_timer(float $timer, string $label = 'Timer', string $dest = 'console')
| see | \rcube::timer() |
|---|---|
floatTimer (self::timer() result)
stringLog line prefix
stringLog file name
Q( $str, $mode = 'strict', $newlines = true) : string
Shortcut function for rcube_utils::rep_specialchars_output()
stringHTML-quoted string
raise_error(array $arg = array(), boolean $log = false, boolean $terminate = false)
arrayNamed parameters
booleanTrue to log the error
booleanTerminate script execution
session_init()
set_special_folders()
This must be done AFTER connecting to the server!
set_storage_prop()
set_user( $user)
shutdown()
sleep()
No action is required on wake up, all connections will be re-established automatically.
smtp_init(boolean $connect = false)
booleanTrue if connection should be established
storage_init()
storage_log_session( $args)
text_exists(string $name, string $domain = null, string &$ref_domain = null) : boolean
stringLabel name
stringLabel domain (plugin) name or '*' for all domains
stringSets domain name if label is found
booleanTrue if text exists (either in the current language or in en_US)
timer() : float
floatCurrent time in seconds since the Unix
url(mixed $p) : string
mixedEither a string with the action or url parameters as key-value pairs
stringValid application URL
write_log(string $name, mixed $line) : boolean
Date will be added automatically to the line.
stringName of the log file
mixedLine to append
booleanTrue on success, False on failure
INIT_WITH_DB
INIT_WITH_PLUGINS
REQUEST_VALID
REQUEST_ERROR_URL
REQUEST_ERROR_TOKEN
DEBUG_LINE_LENGTH
memcache : \Memcache
| var |
|---|
\Memcache
request_status : integer
| var |
|---|
integer
texts :
caches :
shutdown_functions :