diff options
-rw-r--r-- | program/include/html.php | 91 | ||||
-rw-r--r-- | program/include/main.inc | 48 | ||||
-rw-r--r-- | program/include/rcmail.php | 81 | ||||
-rw-r--r-- | program/include/rcube_addressbook.php | 10 | ||||
-rw-r--r-- | program/include/rcube_config.php | 20 | ||||
-rw-r--r-- | program/include/rcube_contacts.php | 15 | ||||
-rw-r--r-- | program/include/rcube_html_page.php | 12 | ||||
-rw-r--r-- | program/include/rcube_imap.php | 407 | ||||
-rw-r--r-- | program/include/rcube_json_output.php | 30 | ||||
-rw-r--r-- | program/include/rcube_mdb2.php | 68 | ||||
-rw-r--r-- | program/include/rcube_message.php | 41 | ||||
-rw-r--r-- | program/include/rcube_plugin.php | 44 | ||||
-rw-r--r-- | program/include/rcube_plugin_api.php | 46 | ||||
-rw-r--r-- | program/include/rcube_user.php | 45 |
14 files changed, 625 insertions, 333 deletions
diff --git a/program/include/html.php b/program/include/html.php index 527fa9b02..b73c54a8c 100644 --- a/program/include/html.php +++ b/program/include/html.php @@ -39,7 +39,7 @@ class html /** * Constructor * - * @param array Hash array with tag attributes + * @param array $attrib Hash array with tag attributes */ public function __construct($attrib = array()) { @@ -63,10 +63,10 @@ class html /** * Generic method to create a HTML tag * - * @param string Tag name - * @param array Tag attributes as key/value pairs - * @param string Optinal Tag content (creates a container tag) - * @param array List with allowed attributes, omit to allow all + * @param string $tagname Tag name + * @param array $attrib Tag attributes as key/value pairs + * @param string $content Optinal Tag content (creates a container tag) + * @param array $allowed_attrib List with allowed attributes, omit to allow all * @return string The XHTML tag */ public static function tag($tagname, $attrib = array(), $content = null, $allowed_attrib = null) @@ -88,8 +88,8 @@ class html /** * Derrived method for <div> containers * - * @param mixed Hash array with tag attributes or string with class name - * @param string Div content + * @param mixed $attr Hash array with tag attributes or string with class name + * @param string $cont Div content * @return string HTML code * @see html::tag() */ @@ -104,8 +104,8 @@ class html /** * Derrived method for <p> blocks * - * @param mixed Hash array with tag attributes or string with class name - * @param string Paragraph content + * @param mixed $attr Hash array with tag attributes or string with class name + * @param string $cont Paragraph content * @return string HTML code * @see html::tag() */ @@ -120,7 +120,7 @@ class html /** * Derrived method to create <img /> * - * @param mixed Hash array with tag attributes or string with image source (src) + * @param mixed $attr Hash array with tag attributes or string with image source (src) * @return string HTML code * @see html::tag() */ @@ -136,8 +136,8 @@ class html /** * Derrived method for link tags * - * @param mixed Hash array with tag attributes or string with link location (href) - * @param string Link content + * @param mixed $attr Hash array with tag attributes or string with link location (href) + * @param string $cont Link content * @return string HTML code * @see html::tag() */ @@ -153,8 +153,8 @@ class html /** * Derrived method for inline span tags * - * @param mixed Hash array with tag attributes or string with class name - * @param string Tag content + * @param mixed $attr Hash array with tag attributes or string with class name + * @param string $cont Tag content * @return string HTML code * @see html::tag() */ @@ -169,8 +169,8 @@ class html /** * Derrived method for form element labels * - * @param mixed Hash array with tag attributes or string with 'for' attrib - * @param string Tag content + * @param mixed $attr Hash array with tag attributes or string with 'for' attrib + * @param string $cont Tag content * @return string HTML code * @see html::tag() */ @@ -185,7 +185,7 @@ class html /** * Derrived method to create <iframe></iframe> * - * @param mixed Hash array with tag attributes or string with frame source (src) + * @param mixed $attr Hash array with tag attributes or string with frame source (src) * @return string HTML code * @see html::tag() */ @@ -212,8 +212,8 @@ class html /** * Create string with attributes * - * @param array Associative arry with tag attributes - * @param array List of allowed attributes + * @param array $attrib Associative arry with tag attributes + * @param array $allowed List of allowed attributes * @return string Valid attribute string */ public static function attrib_string($attrib = array(), $allowed = null) @@ -270,6 +270,11 @@ class html_inputfield extends html 'autocomplete','checked','onchange','onclick','disabled','readonly', 'spellcheck','results','maxlength','src'); + /** + * Object constructor + * + * @param array $attrib Associative array with tag attributes + */ public function __construct($attrib = array()) { if (is_array($attrib)) { @@ -288,8 +293,8 @@ class html_inputfield extends html /** * Compose input tag * - * @param string Field value - * @param array Additional attributes to override + * @param string $value Field value + * @param array $attrib Additional attributes to override * @return string HTML output */ public function show($value = null, $attrib = null) @@ -334,7 +339,7 @@ class html_hiddenfield extends html_inputfield /** * Constructor * - * @param array Named tag attributes + * @param array $attrib Named tag attributes */ public function __construct($attrib = null) { @@ -346,7 +351,7 @@ class html_hiddenfield extends html_inputfield /** * Add a hidden field to this instance * - * @param array Named tag attributes + * @param array $attrib Named tag attributes */ public function add($attrib) { @@ -380,8 +385,8 @@ class html_radiobutton extends html_inputfield /** * Get HTML code for this object * - * @param string Value of the checked field - * @param array Additional attributes to override + * @param string $value Value of the checked field + * @param array $attrib Additional attributes to override * @return string HTML output */ public function show($value = '', $attrib = null) @@ -410,8 +415,8 @@ class html_checkbox extends html_inputfield /** * Get HTML code for this object * - * @param string Value of the checked field - * @param array Additional attributes to override + * @param string $value Value of the checked field + * @param array $attrib Additional attributes to override * @return string HTML output */ public function show($value = '', $attrib = null) @@ -442,8 +447,8 @@ class html_textarea extends html /** * Get HTML code for this object * - * @param string Textbox value - * @param array Additional attributes to override + * @param string $value Textbox value + * @param array $attrib Additional attributes to override * @return string HTML output */ public function show($value = '', $attrib = null) @@ -501,8 +506,8 @@ class html_select extends html /** * Add a new option to this drop-down * - * @param mixed Option name or array with option names - * @param mixed Option value or array with option values + * @param mixed $names Option name or array with option names + * @param mixed $values Option value or array with option values */ public function add($names, $values = null) { @@ -520,8 +525,8 @@ class html_select extends html /** * Get HTML code for this object * - * @param string Value of the selection option - * @param array Additional attributes to override + * @param string $select Value of the selection option + * @param array $attrib Additional attributes to override * @return string HTML output */ public function show($select = array(), $attrib = null) @@ -562,7 +567,11 @@ class html_table extends html private $rowindex = 0; private $colindex = 0; - + /** + * Constructor + * + * @param array $attrib Named tag attributes + */ public function __construct($attrib = array()) { $this->attrib = array_merge($attrib, array('summary' => '', 'border' => 0)); @@ -571,8 +580,8 @@ class html_table extends html /** * Add a table cell * - * @param array Cell attributes - * @param string Cell content + * @param array $attr Cell attributes + * @param string $cont Cell content */ public function add($attr, $cont) { @@ -595,8 +604,8 @@ class html_table extends html /** * Add a table header cell * - * @param array Cell attributes - * @param string Cell content + * @param array $attr Cell attributes + * @param string $cont Cell content */ public function add_header($attr, $cont) { @@ -640,7 +649,7 @@ class html_table extends html /** * Jump to next row * - * @param array Row attributes + * @param array $attr Row attributes */ public function add_row($attr = array()) { @@ -654,7 +663,7 @@ class html_table extends html /** * Set current row attrib * - * @param array Row attributes + * @param array $attr Row attributes */ public function set_row_attribs($attr = array()) { @@ -667,7 +676,7 @@ class html_table extends html /** * Build HTML output of the table data * - * @param array Table attributes + * @param array $attrib Table attributes * @return string The final table HTML code */ public function show($attrib = null) diff --git a/program/include/main.inc b/program/include/main.inc index f3f1a970d..0fddfb40e 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -151,6 +151,7 @@ function rcmail_temp_gc() /** * Garbage collector for cache entries. * Remove all expired message cache records + * @return void */ function rcmail_cache_gc() { @@ -187,7 +188,7 @@ function rcube_error_handler($errno, $errstr) * @param string Input string * @param string Suspected charset of the input string * @param string Target charset to convert to; defaults to RCMAIL_CHARSET - * @return Converted string + * @return string Converted string */ function rcube_charset_convert($str, $from, $to=NULL) { @@ -322,8 +323,8 @@ function rcube_charset_convert($str, $from, $to=NULL) * Sometimes charset string is malformed, there are also charset aliases * but we need strict names for charset conversion (specially utf8 class) * - * @param string Input charset name - * @return The validated charset name + * @param string Input charset name + * @return string The validated charset name */ function rcube_parse_charset($input) { @@ -427,7 +428,7 @@ function rcube_parse_charset($input) * Converts string from standard UTF-7 (RFC 2152) to UTF-8. * * @param string Input string - * @return The converted string + * @return string The converted string */ function rcube_utf7_to_utf8($str) { @@ -486,7 +487,7 @@ function rcube_utf7_to_utf8($str) * Converts string from UTF-16 to UTF-8 (helper for utf-7 to utf-8 conversion) * * @param string Input string - * @return The converted string + * @return string The converted string */ function rcube_utf16_to_utf8($str) { @@ -517,7 +518,7 @@ function rcube_utf16_to_utf8($str) * @param string Encoding type: text|html|xml|js|url * @param string Replace mode for tags: show|replace|remove * @param boolean Convert newlines - * @return The quoted string + * @return string The quoted string */ function rep_specialchars_output($str, $enctype='', $mode='', $newlines=TRUE) { @@ -1087,6 +1088,7 @@ function format_email_recipient($email, $name='') * Print or write debug messages * * @param mixed Debug message or data + * @return void */ function console() { @@ -1121,6 +1123,7 @@ function console() * * @param $name name of log file * @param line Line to append + * @return void */ function write_log($name, $line) { @@ -1173,6 +1176,8 @@ function write_log($name, $line) /** * Write login data (name, ID, IP address) to the 'userlogins' log file. + * + * @return void */ function rcmail_log_login() { @@ -1201,6 +1206,7 @@ function rcmail_log_login() /** * @access private + * @return mixed */ function rcube_timer() { @@ -1210,6 +1216,7 @@ function rcube_timer() /** * @access private + * @return void */ function rcube_print_time($timer, $label='Timer', $dest='console') { @@ -1292,7 +1299,7 @@ function rcmail_mailbox_list($attrib) * Return the mailboxlist as html_select object * * @param array Named parameters - * @return object html_select HTML drop-down object + * @return html_select HTML drop-down object */ function rcmail_mailbox_select($p = array()) { @@ -1319,6 +1326,7 @@ function rcmail_mailbox_select($p = array()) /** * Create a hierarchical array of the mailbox list * @access private + * @return void */ function rcmail_build_folder_tree(&$arrFolders, $folder, $delm='/', $path='') { @@ -1354,6 +1362,7 @@ function rcmail_build_folder_tree(&$arrFolders, $folder, $delm='/', $path='') /** * Return html for a structured list <ul> for the mailbox tree * @access private + * @return string */ function rcmail_render_folder_tree_html(&$arrFolders, &$mbox_name, &$jslist, $attrib, $nestLevel=0) { @@ -1452,6 +1461,7 @@ function rcmail_render_folder_tree_html(&$arrFolders, &$mbox_name, &$jslist, $at /** * Return html for a flat list <select> for the mailbox tree * @access private + * @return string */ function rcmail_render_folder_tree_select(&$arrFolders, &$mbox_name, $maxlength, &$select, $realnames=false, $nestLevel=0) { @@ -1485,6 +1495,7 @@ function rcmail_render_folder_tree_select(&$arrFolders, &$mbox_name, $maxlength, /** * Return internal name for the given folder if it matches the configured special folders * @access private + * @return string */ function rcmail_folder_classname($folder_id) { @@ -1522,6 +1533,7 @@ function rcmail_localize_foldername($name) * Output HTML editor scripts * * @param string Editor mode + * @return void */ function rcube_html_editor($mode='') { @@ -1552,6 +1564,7 @@ function rcube_html_editor($mode='') * * @param integer HTTPS port number * @param boolean Enables 'use_https' option checking + * @return boolean */ function rcube_https_check($port=null, $use_https=true) { @@ -1570,7 +1583,13 @@ function rcube_https_check($port=null, $use_https=true) } -// for backward compatibility +/** + * For backward compatibility. + * + * @global rcmail $RCMAIL + * @param string $var_name Variable name. + * @return void + */ function rcube_sess_unset($var_name=null) { global $RCMAIL; @@ -1579,7 +1598,13 @@ function rcube_sess_unset($var_name=null) } -// Replaces hostname variables + +/** + * Replaces hostname variables + * + * @param string $name Hostname + * @return string + */ function rcube_parse_host($name) { // %n - host @@ -1598,6 +1623,10 @@ function rcube_parse_host($name) /** * E-mail address validation + * + * @param string $email Email address + * @param boolean $dns_check True to check dns + * @return boolean */ function check_email($email, $dns_check=true) { @@ -1723,6 +1752,7 @@ function raise_error($arg=array(), $log=false, $terminate=false) * Report error according to configured debug_level * * @param array Named parameters + * @return void * @see raise_error() */ function log_bug($arg_arr) diff --git a/program/include/rcmail.php b/program/include/rcmail.php index 9b5a498b6..89a2ef6af 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -28,19 +28,88 @@ */ class rcmail { + /** + * Main tasks. + * + * @var array + */ static public $main_tasks = array('mail','settings','addressbook','login','logout','utils','dummy'); + /** + * Singleton instace of rcmail + * + * @var rcmail + */ static private $instance; + /** + * Stores instance of rcube_config. + * + * @var rcube_config + */ public $config; + + /** + * Stores rcube_user instance. + * + * @var rcube_user + */ public $user; + + /** + * Instace of database class. + * + * @var rcube_mdb2 + */ public $db; + + /** + * Instace of rcube_session class. + * + * @var rcube_session + */ public $session; + + /** + * Instance of rcube_smtp class. + * + * @var rcube_smtp + */ public $smtp; + + /** + * Instance of rcube_imap class. + * + * @var rcube_imap + */ public $imap; + + /** + * Instance of rcube_template class. + * + * @var rcube_template + */ public $output; + + /** + * Instance of rcube_plugin_api. + * + * @var rcube_plugin_api + */ public $plugins; + + /** + * Current task. + * + * @var string + */ public $task; + + /** + * Current action. + * + * @var string + */ public $action = ''; public $comm_path = './'; @@ -51,7 +120,7 @@ class rcmail /** * This implements the 'singleton' design pattern * - * @return object rcmail The one and only instance + * @return rcmail The one and only instance */ static function get_instance() { @@ -154,7 +223,7 @@ class rcmail /** * Setter for system user object * - * @param object rcube_user Current user instance + * @param rcube_user Current user instance */ public function set_user($user) { @@ -226,7 +295,7 @@ class rcmail /** * Get the current database connection * - * @return object rcube_mdb2 Database connection object + * @return rcube_mdb2 Database connection object */ public function get_dbh() { @@ -247,7 +316,7 @@ class rcmail * * @param string Address book identifier * @param boolean True if the address book needs to be writeable - * @return object rcube_contacts Address book object + * @return rcube_contacts Address book object */ public function get_address_book($id, $writeable = false) { @@ -346,7 +415,7 @@ class rcmail * environment vars according to the current session and configuration * * @param boolean True if this request is loaded in a (i)frame - * @return object rcube_template Reference to HTML output object + * @return rcube_template Reference to HTML output object */ public function load_gui($framed = false) { @@ -379,7 +448,7 @@ class rcmail /** * Create an output object for JSON responses * - * @return object rcube_json_output Reference to JSON output object + * @return rcube_json_output Reference to JSON output object */ public function json_init() { diff --git a/program/include/rcube_addressbook.php b/program/include/rcube_addressbook.php index 3b07235de..c8e18ea85 100644 --- a/program/include/rcube_addressbook.php +++ b/program/include/rcube_addressbook.php @@ -83,14 +83,14 @@ abstract class rcube_addressbook /** * Count number of available contacts in database * - * @return object rcube_result_set Result set with values for 'count' and 'first' + * @return rcube_result_set Result set with values for 'count' and 'first' */ abstract function count(); /** * Return the last result set * - * @return object rcube_result_set Current result set or NULL if nothing selected yet + * @return rcube_result_set Current result set or NULL if nothing selected yet */ abstract function get_result(); @@ -142,7 +142,7 @@ abstract class rcube_addressbook * * @param array Assoziative array with save data * @param boolean True to check for duplicates first - * @return The created record ID on success, False on error + * @return mixed The created record ID on success, False on error */ function insert($save_data, $check=false) { @@ -154,7 +154,7 @@ abstract class rcube_addressbook * * @param mixed Record identifier * @param array Assoziative array with save data - * @return True on success, False on error + * @return boolean True on success, False on error */ function update($id, $save_cols) { @@ -183,7 +183,7 @@ abstract class rcube_addressbook * Create a contact group with the given name * * @param string The group name - * @return False on error, array with record props in success + * @return mixed False on error, array with record props in success */ function create_group($name) { diff --git a/program/include/rcube_config.php b/program/include/rcube_config.php index 8020c3912..a7e1d9ef5 100644 --- a/program/include/rcube_config.php +++ b/program/include/rcube_config.php @@ -130,7 +130,7 @@ class rcube_config * Read configuration from a file * and merge with the already stored config values * - * @param string Full path to the config file to be loaded + * @param string $fpath Full path to the config file to be loaded * @return booelan True on success, false on failure */ public function load_from_file($fpath) @@ -150,8 +150,8 @@ class rcube_config /** * Getter for a specific config parameter * - * @param string Parameter name - * @param mixed Default value if not set + * @param string $name Parameter name + * @param mixed $def Default value if not set * @return mixed The requested config value */ public function get($name, $def = null) @@ -163,8 +163,8 @@ class rcube_config /** * Setter for a config parameter * - * @param string Parameter name - * @param mixed Parameter value + * @param string $name Parameter name + * @param mixed $value Parameter value */ public function set($name, $value) { @@ -175,7 +175,7 @@ class rcube_config /** * Override config options with the given values (eg. user prefs) * - * @param array Hash array with config props to merge over + * @param array $prefs Hash array with config props to merge over */ public function merge($prefs) { @@ -187,7 +187,7 @@ class rcube_config * Merge the given prefs over the current config * and make sure that they survive further merging. * - * @param array Hash array with user prefs + * @param array $prefs Hash array with user prefs */ public function set_user_prefs($prefs) { @@ -210,7 +210,7 @@ class rcube_config /** * Return requested DES crypto key. * - * @param string Crypto key name + * @param string $key Crypto key name * @return string Crypto key */ public function get_crypto_key($key) @@ -274,8 +274,8 @@ class rcube_config /** * Return the mail domain configured for the given host * - * @param string IMAP host - * @param boolean If true, domain name will be converted to IDN ASCII + * @param string $host IMAP host + * @param boolean $encode If true, domain name will be converted to IDN ASCII * @return string Resolved SMTP host */ public function mail_domain($host, $encode=true) diff --git a/program/include/rcube_contacts.php b/program/include/rcube_contacts.php index 8f93374a0..16e39fc7e 100644 --- a/program/include/rcube_contacts.php +++ b/program/include/rcube_contacts.php @@ -32,6 +32,11 @@ class rcube_contacts extends rcube_addressbook protected $db_groups = 'contactgroups'; protected $db_groupmembers = 'contactgroupmembers'; + /** + * Store database connection. + * + * @var rcube_mdb2 + */ private $db = null; private $user_id = 0; private $filter = null; @@ -310,7 +315,7 @@ class rcube_contacts extends rcube_addressbook /** * Return the last result set * - * @return Result array or NULL if nothing selected yet + * @return mixed Result array or NULL if nothing selected yet */ function get_result() { @@ -322,7 +327,7 @@ class rcube_contacts extends rcube_addressbook * Get a specific contact record * * @param mixed record identifier(s) - * @return Result object with all record fields or False if not found + * @return mixed Result object with all record fields or False if not found */ function get_record($id, $assoc=false) { @@ -353,7 +358,7 @@ class rcube_contacts extends rcube_addressbook * Create a new contact record * * @param array Assoziative array with save data - * @return The created record ID on success, False on error + * @return integer|boolean The created record ID on success, False on error */ function insert($save_data, $check=false) { @@ -412,7 +417,7 @@ class rcube_contacts extends rcube_addressbook * * @param mixed Record identifier * @param array Assoziative array with save data - * @return True on success, False on error + * @return boolean True on success, False on error */ function update($id, $save_cols) { @@ -484,7 +489,7 @@ class rcube_contacts extends rcube_addressbook * Create a contact group with the given name * * @param string The group name - * @return False on error, array with record props in success + * @return mixed False on error, array with record props in success */ function create_group($name) { diff --git a/program/include/rcube_html_page.php b/program/include/rcube_html_page.php index 9abe08e0b..06cb5cb56 100644 --- a/program/include/rcube_html_page.php +++ b/program/include/rcube_html_page.php @@ -84,6 +84,8 @@ class rcube_html_page /** * Add HTML code to the page header + * + * @param string $str HTML code */ public function add_header($str) { @@ -93,6 +95,8 @@ class rcube_html_page /** * Add HTML code to the page footer * To be added right befor </body> + * + * @param string $str HTML code */ public function add_footer($str) { @@ -101,6 +105,8 @@ class rcube_html_page /** * Setter for page title + * + * @param string $t Page title */ public function set_title($t) { @@ -110,6 +116,8 @@ class rcube_html_page /** * Setter for output charset. * To be specified in a meta tag and sent as http-header + * + * @param string $charset Charset */ public function set_charset($charset) { @@ -118,6 +126,8 @@ class rcube_html_page /** * Getter for output charset + * + * @return string Output charset */ public function get_charset() { @@ -263,6 +273,8 @@ class rcube_html_page /** * Callback function for preg_replace_callback in write() + * + * @return string Parsed string */ private function file_callback($matches) { diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php index ffd95f9d6..a8883414c 100644 --- a/program/include/rcube_imap.php +++ b/program/include/rcube_imap.php @@ -40,8 +40,19 @@ class rcube_imap public $delimiter = NULL; public $threading = false; public $fetch_add_headers = ''; - public $conn; // rcube_imap_generic object + /** + * Instance of rcube_imap_generic + * + * @var rcube_imap_generic + */ + public $conn; + + /** + * Instance of rcube_mdb2 + * + * @var rcube_mdb2 + */ private $db; private $root_ns = ''; private $mailbox = 'INBOX'; @@ -83,11 +94,11 @@ class rcube_imap /** * Connect to an IMAP server * - * @param string Host to connect - * @param string Username for IMAP account - * @param string Password for IMAP account - * @param number Port to connect to - * @param string SSL schema (either ssl or tls) or null if plain connection + * @param string $host Host to connect + * @param string $user Username for IMAP account + * @param string $pass Password for IMAP account + * @param integer $port Port to connect to + * @param string $use_ssl SSL schema (either ssl or tls) or null if plain connection * @return boolean TRUE on success, FALSE on failure * @access public */ @@ -180,6 +191,8 @@ class rcube_imap /** * Set options to be used in rcube_imap_generic::connect() + * + * @param array $opt Options array */ function set_options($opt) { @@ -192,7 +205,7 @@ class rcube_imap * Only folders within this root folder will be displayed * and all folder paths will be translated using this folder name * - * @param string Root folder + * @param string $root Root folder * @access public */ function set_rootdir($root) @@ -213,7 +226,7 @@ class rcube_imap * * This will be used for message decoding if a charset specification is not available * - * @param string Charset string + * @param string $cs Charset string * @access public */ function set_charset($cs) @@ -225,7 +238,7 @@ class rcube_imap /** * This list of folders will be listed above all other folders * - * @param array Indexed list of folder names + * @param array $arr Indexed list of folder names * @access public */ function set_default_mailboxes($arr) @@ -245,7 +258,7 @@ class rcube_imap * * All operations will be perfomed on this mailbox/folder * - * @param string Mailbox/Folder name + * @param string $new_mbox Mailbox/Folder name * @access public */ function set_mailbox($new_mbox) @@ -265,7 +278,7 @@ class rcube_imap /** * Set internal list page * - * @param number Page number to list + * @param number $page Page number to list * @access public */ function set_page($page) @@ -277,7 +290,7 @@ class rcube_imap /** * Set internal page size * - * @param number Number of messages to display on one page + * @param number $size Number of messages to display on one page * @access public */ function set_pagesize($size) @@ -344,7 +357,7 @@ class rcube_imap /** * Returns the IMAP server's capability * - * @param string Capability name + * @param string $cap Capability name * @return mixed Capability value or TRUE if supported, FALSE if not * @access public */ @@ -357,7 +370,7 @@ class rcube_imap /** * Sets threading flag to the best supported THREAD algorithm * - * @param boolean TRUE to enable and FALSE + * @param boolean $enable TRUE to enable and FALSE * @return string Algorithm or false if THREAD is not supported * @access public */ @@ -382,7 +395,7 @@ class rcube_imap * Checks the PERMANENTFLAGS capability of the current mailbox * and returns true if the given flag is supported by the IMAP server * - * @param string Permanentflag name + * @param string $flag Permanentflag name * @return mixed True if this flag is supported * @access public */ @@ -415,11 +428,11 @@ class rcube_imap /** * Get message count for a specific mailbox * - * @param string Mailbox/folder name - * @param string Mode for count [ALL|THREADS|UNSEEN|RECENT] - * @param boolean Force reading from server and update cache - * @param boolean Enables storing folder status info (max UID/count), - * required for mailbox_status() + * @param string $mbox_name Mailbox/folder name + * @param string $mode Mode for count [ALL|THREADS|UNSEEN|RECENT] + * @param boolean $force Force reading from server and update cache + * @param boolean $status Enables storing folder status info (max UID/count), + * required for mailbox_status() * @return int Number of messages * @access public */ @@ -433,6 +446,12 @@ class rcube_imap /** * Private method for getting nr of messages * + * @param string $mailbox Mailbox name + * @param string $mode Mode for count [ALL|THREADS|UNSEEN|RECENT] + * @param boolean $force Force reading from server and update cache + * @param boolean $status Enables storing folder status info (max UID/count), + * required for mailbox_status() + * @return int Number of messages * @access private * @see rcube_imap::messagecount() */ @@ -513,6 +532,8 @@ class rcube_imap /** * Private method for getting nr of threads * + * @param string $mailbox + * @param int $msg_count * @access private * @see rcube_imap::messagecount() */ @@ -534,11 +555,11 @@ class rcube_imap * Public method for listing headers * convert mailbox name with root dir first * - * @param string Mailbox/folder name - * @param int Current page to list - * @param string Header field to sort by - * @param string Sort order [ASC|DESC] - * @param boolean Number of slice items to extract from result array + * @param string $mbox_name Mailbox/folder name + * @param int $page Current page to list + * @param string $sort_field Header field to sort by + * @param string $sort_order Sort order [ASC|DESC] + * @param int $slice Number of slice items to extract from result array * @return array Indexed array with message header objects * @access public */ @@ -552,6 +573,12 @@ class rcube_imap /** * Private method for listing message headers * + * @param string $mailbox Mailbox name + * @param int $page Current page to list + * @param string $sort_field Header field to sort by + * @param string $sort_order Sort order [ASC|DESC] + * @param int $slice Number of slice items to extract from result array + * @return array Indexed array with message header objects * @access private * @see rcube_imap::list_headers */ @@ -676,6 +703,13 @@ class rcube_imap /** * Private method for listing message headers using threads * + * @param string $mailbox Mailbox/folder name + * @param int $page Current page to list + * @param string $sort_field Header field to sort by + * @param string $sort_order Sort order [ASC|DESC] + * @param boolean $recursive + * @param int $slice Number of slice items to extract from result array + * @return array Indexed array with message header objects * @access private * @see rcube_imap::list_headers */ @@ -703,7 +737,7 @@ class rcube_imap /** * Private method for fetching threads data * - * @param string Mailbox/folder name + * @param string $mailbox Mailbox/folder name * @return array Array with thread data * @access private */ @@ -732,6 +766,13 @@ class rcube_imap /** * Private method for fetching threaded messages headers * + * @param string $mailbox Mailbox name + * @param string $thread_tree + * @param int $msg_depth + * @param boolean $has_children + * @param int $msg_index + * @param int $page + * @param int $slice * @access private */ private function _fetch_thread_headers($mailbox, $thread_tree, $msg_depth, $has_children, $msg_index, $page, $slice=0) @@ -779,9 +820,9 @@ class rcube_imap * Private method for setting threaded messages flags: * depth, has_children and unread_children * - * @param array Reference to headers array indexed by message ID - * @param array Array of messages depth indexed by message ID - * @param array Array of messages children flags indexed by message ID + * @param array $headers Reference to headers array indexed by message ID + * @param array $msg_depth Array of messages depth indexed by message ID + * @param array $msg_children Array of messages children flags indexed by message ID * @return array Message headers array indexed by message ID * @access private */ @@ -810,11 +851,11 @@ class rcube_imap /** * Private method for listing a set of message headers (search results) * - * @param string Mailbox/folder name - * @param int Current page to list - * @param string Header field to sort by - * @param string Sort order [ASC|DESC] - * @param boolean Number of slice items to extract from result array + * @param string $mailbox Mailbox/folder name + * @param int $page Current page to list + * @param string $sort_field Header field to sort by + * @param string $sort_order Sort order [ASC|DESC] + * @param int $slice Number of slice items to extract from result array * @return array Indexed array with message header objects * @access private * @see rcube_imap::list_header_set() @@ -943,11 +984,11 @@ class rcube_imap /** * Private method for listing a set of threaded message headers (search results) * - * @param string Mailbox/folder name - * @param int Current page to list - * @param string Header field to sort by - * @param string Sort order [ASC|DESC] - * @param boolean Number of slice items to extract from result array + * @param string $mailbox Mailbox/folder name + * @param int $page Current page to list + * @param string $sort_field Header field to sort by + * @param string $sort_order Sort order [ASC|DESC] + * @param int $slice Number of slice items to extract from result array * @return array Indexed array with message header objects * @access private * @see rcube_imap::list_header_set() @@ -985,8 +1026,8 @@ class rcube_imap /** * Helper function to get first and last index of the requested set * - * @param int message count - * @param mixed page number to show, or string 'all' + * @param int $max message count + * @param mixed $page page number to show, or string 'all' * @return array array with two values: first index, last index * @access private */ @@ -1084,7 +1125,7 @@ class rcube_imap * We compare the maximum UID to determine the number of * new messages because the RECENT flag is not reliable. * - * @param string Mailbox/folder name + * @param string $mbox_name Mailbox/folder name * @return int Folder status */ function mailbox_status($mbox_name = null) @@ -1116,9 +1157,9 @@ class rcube_imap * Stores folder statistic data in session * @TODO: move to separate DB table (cache?) * - * @param string Mailbox name - * @param string Data name - * @param mixed Data value + * @param string $mbox_name Mailbox name + * @param string $name Data name + * @param mixed $data Data value */ private function set_folder_stats($mbox_name, $name, $data) { @@ -1129,7 +1170,7 @@ class rcube_imap /** * Gets folder statistic data * - * @param string Mailbox name + * @param string $mbox_name Mailbox name * @return array Stats data */ private function get_folder_stats($mbox_name) @@ -1144,9 +1185,9 @@ class rcube_imap /** * Return sorted array of message IDs (not UIDs) * - * @param string Mailbox to get index from - * @param string Sort column - * @param string Sort order [ASC, DESC] + * @param string $mbox_name Mailbox to get index from + * @param string $sort_field Sort column + * @param string $sort_order Sort order [ASC, DESC] * @return array Indexed array with message ids */ function message_index($mbox_name='', $sort_field=NULL, $sort_order=NULL) @@ -1257,9 +1298,9 @@ class rcube_imap /** * Return sorted array of threaded message IDs (not UIDs) * - * @param string Mailbox to get index from - * @param string Sort column - * @param string Sort order [ASC, DESC] + * @param string $mbox_name Mailbox to get index from + * @param string $sort_field Sort column + * @param string $sort_order Sort order [ASC, DESC] * @return array Indexed array with message IDs */ function thread_index($mbox_name='', $sort_field=NULL, $sort_order=NULL) @@ -1303,10 +1344,10 @@ class rcube_imap /** * Return array of threaded messages (all, not only roots) * - * @param string Mailbox to get index from - * @param array Threaded messages array (see _fetch_threads()) - * @param array Message IDs if we know what we need (e.g. search result) - * for better performance + * @param string $mailbox Mailbox to get index from + * @param array $thread_tree Threaded messages array (see _fetch_threads()) + * @param array $ids Message IDs if we know what we need (e.g. search result) + * for better performance * @return array Indexed array with message IDs * * @access private @@ -1336,6 +1377,7 @@ class rcube_imap /** + * @param string $mailbox Mailbox name * @access private */ private function sync_header_index($mailbox) @@ -1430,10 +1472,10 @@ class rcube_imap /** * Invoke search request to IMAP server * - * @param string mailbox name to search in - * @param string search string - * @param string search string charset - * @param string header field to sort by + * @param string $mbox_name mailbox name to search in + * @param string $str search string + * @param string $charset search string charset + * @param string $sort_field header field to sort by * @return array search results as list of message ids * @access public */ @@ -1456,6 +1498,10 @@ class rcube_imap /** * Private search method * + * @param string $mailbox Mailbox name + * @param string $criteria Search criteria + * @param string $charset Charset + * @param string $sort_field Sorting field * @return array search results as list of message ids * @access private * @see rcube_imap::search() @@ -1532,9 +1578,9 @@ class rcube_imap * Direct (real and simple) SEARCH request to IMAP server, * without result sorting and caching * - * @param string Mailbox name to search in - * @param string Search string - * @param boolean True if UIDs should be returned + * @param string $mbox_name Mailbox name to search in + * @param string $str Search string + * @param boolean $ret_uid True if UIDs should be returned * @return array Search results as list of message IDs or UIDs * @access public */ @@ -1552,9 +1598,9 @@ class rcube_imap /** * Converts charset of search criteria string * - * @param string Search string - * @param string Original charset - * @param string Destination charset (default US-ASCII) + * @param string $str Search string + * @param string $charset Original charset + * @param string $dest_charset Destination charset (default US-ASCII) * @return string Search string * @access private */ @@ -1585,9 +1631,9 @@ class rcube_imap /** * Sort thread * - * @param string Mailbox name - * @param array Unsorted thread tree (rcube_imap_generic::thread() result) - * @param array Message IDs if we know what we need (e.g. search result) + * @param string $mailbox Mailbox name + * @param array $thread_tree Unsorted thread tree (rcube_imap_generic::thread() result) + * @param array $ids Message IDs if we know what we need (e.g. search result) * @return array Sorted roots IDs * @access private */ @@ -1632,8 +1678,8 @@ class rcube_imap /** * THREAD=REFS sorting implementation * - * @param array Thread tree array (message identifiers as keys) - * @param array Array of sorted message identifiers + * @param array $tree Thread tree array (message identifiers as keys) + * @param array $index Array of sorted message identifiers * @return array Array of sorted roots messages * @access private */ @@ -1693,6 +1739,7 @@ class rcube_imap /** * Check if the given message ID is part of the current search set * + * @param string $msgid Message id * @return boolean True on match or if no search request is stored */ function in_searchset($msgid) @@ -1711,10 +1758,10 @@ class rcube_imap /** * Return message headers object of a specific message * - * @param int Message ID - * @param string Mailbox to read from - * @param boolean True if $id is the message UID - * @param boolean True if we need also BODYSTRUCTURE in headers + * @param int $id Message ID + * @param string $mbox_name Mailbox to read from + * @param boolean $is_uid True if $id is the message UID + * @param boolean $bodystr True if we need also BODYSTRUCTURE in headers * @return object Message headers representation */ function get_headers($id, $mbox_name=NULL, $is_uid=true, $bodystr=false) @@ -1745,8 +1792,8 @@ class rcube_imap * Fetch body structure from the IMAP server and build * an object structure similar to the one generated by PEAR::Mail_mimeDecode * - * @param int Message UID to fetch - * @param string Message BODYSTRUCTURE string (optional) + * @param int $uid Message UID to fetch + * @param string $structure_str Message BODYSTRUCTURE string (optional) * @return object rcube_message_part Message part tree or False on failure */ function &get_structure($uid, $structure_str='') @@ -1817,6 +1864,9 @@ class rcube_imap /** * Build message part object * + * @param array $part + * @param int $count + * @param string $parent * @access private */ function &_structure_part($part, $count=0, $parent='', $mime_headers=null) @@ -2004,8 +2054,8 @@ class rcube_imap * Set attachment filename from message part structure * * @access private - * @param object rcube_message_part Part object - * @param string Part's raw headers + * @param rcube_message_part $part Part object + * @param string $headers Part's raw headers */ private function _set_part_filename(&$part, $headers=null) { @@ -2125,7 +2175,7 @@ class rcube_imap * Get charset name from message structure (first part) * * @access private - * @param array Message structure + * @param array $structure Message structure * @return string Charset name */ function _structure_charset($structure) @@ -2141,11 +2191,11 @@ class rcube_imap /** * Fetch message body of a specific message from the server * - * @param int Message UID - * @param string Part number - * @param object rcube_message_part Part object created by get_structure() - * @param mixed True to print part, ressource to write part contents in - * @param resource File pointer to save the message part + * @param int $uid Message UID + * @param string $part Part number + * @param rcube_message_part $o_part Part object created by get_structure() + * @param mixed $print True to print part, ressource to write part contents in + * @param resource $fp File pointer to save the message part * @return string Message/part body if not printed */ function &get_message_part($uid, $part=1, $o_part=NULL, $print=NULL, $fp=NULL) @@ -2191,8 +2241,8 @@ class rcube_imap /** * Fetch message body of a specific message from the server * - * @param int Message UID - * @return string Message/part body + * @param int $uid Message UID + * @return string $part Message/part body * @see rcube_imap::get_message_part() */ function &get_body($uid, $part=1) @@ -2206,7 +2256,7 @@ class rcube_imap /** * Returns the whole message source as string * - * @param int Message UID + * @param int $uid Message UID * @return string Message source string */ function &get_raw_body($uid) @@ -2218,7 +2268,7 @@ class rcube_imap /** * Returns the message headers as string * - * @param int Message UID + * @param int $uid Message UID * @return string Message headers string */ function &get_raw_headers($uid) @@ -2230,7 +2280,7 @@ class rcube_imap /** * Sends the whole message source to stdout * - * @param int Message UID + * @param int $uid Message UID */ function print_raw_body($uid) { @@ -2241,10 +2291,10 @@ class rcube_imap /** * Set message flag to one or several messages * - * @param mixed Message UIDs as array or comma-separated string, or '*' - * @param string Flag to set: SEEN, UNDELETED, DELETED, RECENT, ANSWERED, DRAFT, MDNSENT - * @param string Folder name - * @param boolean True to skip message cache clean up + * @param mixed $uids Message UIDs as array or comma-separated string, or '*' + * @param string $flag Flag to set: SEEN, UNDELETED, DELETED, RECENT, ANSWERED, DRAFT, MDNSENT + * @param string $mbox_name Folder name + * @param boolean $skip_cache True to skip message cache clean up * @return int Number of flagged messages, -1 on failure */ function set_flag($uids, $flag, $mbox_name=NULL, $skip_cache=false) @@ -2284,9 +2334,9 @@ class rcube_imap /** * Remove message flag for one or several messages * - * @param mixed Message UIDs as array or comma-separated string, or '*' - * @param string Flag to unset: SEEN, DELETED, RECENT, ANSWERED, DRAFT, MDNSENT - * @param string Folder name + * @param mixed $uids Message UIDs as array or comma-separated string, or '*' + * @param string $flag Flag to unset: SEEN, DELETED, RECENT, ANSWERED, DRAFT, MDNSENT + * @param string $mbox_name Folder name * @return int Number of flagged messages, -1 on failure * @see set_flag */ @@ -2299,10 +2349,10 @@ class rcube_imap /** * Append a mail message (source) to a specific mailbox * - * @param string Target mailbox - * @param string The message source string or filename - * @param string Headers string if $message contains only the body - * @param boolean True if $message is a filename + * @param string $mbox_name Target mailbox + * @param string $message The message source string or filename + * @param string $headers Headers string if $message contains only the body + * @param boolean $is_file True if $message is a filename * * @return boolean True on success, False on error */ @@ -2330,9 +2380,9 @@ class rcube_imap /** * Move a message from one mailbox to another * - * @param mixed Message UIDs as array or comma-separated string, or '*' - * @param string Target mailbox - * @param string Source mailbox + * @param mixed $uids Message UIDs as array or comma-separated string, or '*' + * @param string $to_mbox Target mailbox + * @param string $from_mbox Source mailbox * @return boolean True on success, False on error */ function move_message($uids, $to_mbox, $from_mbox='') @@ -2411,9 +2461,9 @@ class rcube_imap /** * Copy a message from one mailbox to another * - * @param mixed Message UIDs as array or comma-separated string, or '*' - * @param string Target mailbox - * @param string Source mailbox + * @param mixed $uids Message UIDs as array or comma-separated string, or '*' + * @param string $to_mbox Target mailbox + * @param string $from_mbox Source mailbox * @return boolean True on success, False on error */ function copy_message($uids, $to_mbox, $from_mbox='') @@ -2452,8 +2502,8 @@ class rcube_imap /** * Mark messages as deleted and expunge mailbox * - * @param mixed Message UIDs as array or comma-separated string, or '*' - * @param string Source mailbox + * @param mixed $uids Message UIDs as array or comma-separated string, or '*' + * @param string $mbox_name Source mailbox * @return boolean True on success, False on error */ function delete_message($uids, $mbox_name='') @@ -2506,7 +2556,7 @@ class rcube_imap /** * Clear all messages in a specific mailbox * - * @param string Mailbox name + * @param string $mbox_name Mailbox name * @return int Above 0 on success */ function clear_mailbox($mbox_name=NULL) @@ -2535,8 +2585,8 @@ class rcube_imap /** * Send IMAP expunge command and clear cache * - * @param string Mailbox name - * @param boolean False if cache should not be cleared + * @param string $mbox_name Mailbox name + * @param boolean $clear_cache False if cache should not be cleared * @return boolean True on success */ function expunge($mbox_name='', $clear_cache=true) @@ -2549,9 +2599,9 @@ class rcube_imap /** * Send IMAP expunge command and clear cache * - * @param string Mailbox name - * @param boolean False if cache should not be cleared - * @param mixed Message UIDs as array or comma-separated string, or '*' + * @param string $mailbox Mailbox name + * @param boolean $clear_cache False if cache should not be cleared + * @param mixed $uids Message UIDs as array or comma-separated string, or '*' * @return boolean True on success * @access private * @see rcube_imap::expunge() @@ -2577,8 +2627,8 @@ class rcube_imap /** * Parse message UIDs input * - * @param mixed UIDs array or comma-separated list or '*' or '1:*' - * @param string Mailbox name + * @param mixed $uids UIDs array or comma-separated list or '*' or '1:*' + * @param string $mailbox Mailbox name * @return array Two elements array with UIDs converted to list and ALL flag * @access private */ @@ -2620,8 +2670,8 @@ class rcube_imap /** * Translate UID to message ID * - * @param int Message UID - * @param string Mailbox name + * @param int $uid Message UID + * @param string $mbox_name Mailbox name * @return int Message ID */ function get_id($uid, $mbox_name=NULL) @@ -2634,8 +2684,8 @@ class rcube_imap /** * Translate message number to UID * - * @param int Message ID - * @param string Mailbox name + * @param int $id Message ID + * @param string $mbox_name Mailbox name * @return int Message UID */ function get_uid($id,$mbox_name=NULL) @@ -2655,8 +2705,8 @@ class rcube_imap * * Converts mailbox name with root dir first * - * @param string Optional root folder - * @param string Optional filter for mailbox listing + * @param string $root Optional root folder + * @param string $filter Optional filter for mailbox listing * @return array List of mailboxes/folders * @access public */ @@ -2685,6 +2735,8 @@ class rcube_imap /** * Private method for mailbox listing * + * @param string $root Optional root folder + * @param string $filter Optional filter for mailbox listing * @return array List of mailboxes/folders * @see rcube_imap::list_mailboxes() * @access private @@ -2723,8 +2775,8 @@ class rcube_imap /** * Get a list of all folders available on the IMAP server * - * @param string IMAP root dir - * @param string Optional filter for mailbox listing + * @param string $root IMAP root dir + * @param string $filter Optional filter for mailbox listing * @return array Indexed array with folder names */ function list_unsubscribed($root='', $filter='*') @@ -2780,7 +2832,7 @@ class rcube_imap /** * Subscribe to a specific mailbox(es) * - * @param array Mailbox name(s) + * @param array $a_mboxes Mailbox name(s) * @return boolean True on success */ function subscribe($a_mboxes) @@ -2796,7 +2848,7 @@ class rcube_imap /** * Unsubscribe mailboxes * - * @param array Mailbox name(s) + * @param array $a_mboxes Mailbox name(s) * @return boolean True on success */ function unsubscribe($a_mboxes) @@ -2812,8 +2864,8 @@ class rcube_imap /** * Create a new mailbox on the server and register it in local cache * - * @param string New mailbox name (as utf-7 string) - * @param boolean True if the new mailbox should be subscribed + * @param string $name New mailbox name (as utf-7 string) + * @param boolean $subscribe True if the new mailbox should be subscribed * @param string Name of the created mailbox, false on error */ function create_mailbox($name, $subscribe=false) @@ -2836,8 +2888,8 @@ class rcube_imap /** * Set a new name to an existing mailbox * - * @param string Mailbox to rename (as utf-7 string) - * @param string New mailbox name (as utf-7 string) + * @param string $mbox_name Mailbox to rename (as utf-7 string) + * @param string $new_name New mailbox name (as utf-7 string) * @return string Name of the renames mailbox, False on error */ function rename_mailbox($mbox_name, $new_name) @@ -2889,7 +2941,7 @@ class rcube_imap /** * Remove mailboxes from server * - * @param string Mailbox name(s) string/array + * @param string|array $mbox_name sMailbox name(s) string/array * @return boolean True on success */ function delete_mailbox($mbox_name) @@ -2956,8 +3008,8 @@ class rcube_imap /** * Checks if folder exists and is subscribed * - * @param string Folder name - * @param boolean Enable subscription checking + * @param string $mbox_name Folder name + * @param boolean $subscription Enable subscription checking * @return boolean TRUE or FALSE */ function mailbox_exists($mbox_name, $subscription=false) @@ -2990,8 +3042,8 @@ class rcube_imap /** * Modify folder name for input/output according to root dir and namespace * - * @param string Folder name - * @param string Mode + * @param string $mbox_name Folder name + * @param string $mode Mode * @return string Folder name */ function mod_mailbox($mbox_name, $mode='in') @@ -3015,6 +3067,9 @@ class rcube_imap * --------------------------------*/ /** + * Enable or disable caching + * + * @param boolean $set Flag * @access public */ function set_caching($set) @@ -3026,6 +3081,10 @@ class rcube_imap } /** + * Returns cached value + * + * @param string $key Cache key + * @return mixed * @access public */ function get_cache($key) @@ -3039,6 +3098,10 @@ class rcube_imap } /** + * Update cache + * + * @param string $key Cache key + * @param mixed $data Data * @access private */ private function update_cache($key, $data) @@ -3049,6 +3112,8 @@ class rcube_imap } /** + * Writes the cache + * * @access private */ private function write_cache() @@ -3062,6 +3127,9 @@ class rcube_imap } /** + * Clears the cache. + * + * @param string $key Cache key * @access public */ function clear_cache($key=NULL) @@ -3085,6 +3153,10 @@ class rcube_imap } /** + * Returns cached entry + * + * @param string $key Cache key + * @return mixed Cached value * @access private */ private function _read_cache_record($key) @@ -3110,6 +3182,10 @@ class rcube_imap } /** + * Writes single cache record + * + * @param string $key Cache key + * @param mxied $data Cache value * @access private */ private function _write_cache_record($key, $data) @@ -3153,6 +3229,9 @@ class rcube_imap } /** + * Clears cache for single record + * + * @param string $ket Cache key * @access private */ private function _clear_cache_record($key) @@ -3176,8 +3255,8 @@ class rcube_imap /** * Checks if the cache is up-to-date * - * @param string Mailbox name - * @param string Internal cache key + * @param string $mailbox Mailbox name + * @param string $cache_key Internal cache key * @return int Cache status: -3 = off, -2 = incomplete, -1 = dirty, 1 = OK */ private function check_cache_status($mailbox, $cache_key) @@ -3232,6 +3311,11 @@ class rcube_imap } /** + * @param string $key Cache key + * @param string $from + * @param string $to + * @param string $sort_field + * @param string $sort_order * @access private */ private function get_message_cache($key, $from, $to, $sort_field, $sort_order) @@ -3271,6 +3355,9 @@ class rcube_imap } /** + * @param string $key Cache key + * @param int $uid User id + * @return mixed * @access private */ private function &get_cached_message($key, $uid) @@ -3302,6 +3389,10 @@ class rcube_imap } /** + * @param string $key Cache key + * @param boolean $force Force flag + * @param string $sort_field + * @param string $sort_order * @access private */ private function get_message_cache_index($key, $sort_field='idx', $sort_order='ASC') @@ -3439,6 +3530,8 @@ class rcube_imap } /** + * @param string $key Cache key + * @param int $start_index Start index * @access private */ private function clear_message_cache($key, $start_index=1) @@ -3494,9 +3587,9 @@ class rcube_imap /** * Split an address list into a structured array list * - * @param string Input string - * @param int List only this number of addresses - * @param boolean Decode address strings + * @param string $input Input string + * @param int $max List only this number of addresses + * @param boolean $decode Decode address strings * @return array Indexed list of addresses */ function decode_address_list($input, $max=null, $decode=true) @@ -3544,8 +3637,8 @@ class rcube_imap /** * Decode a message header value * - * @param string Header value - * @param boolean Remove quotes if necessary + * @param string $input Header value + * @param boolean $remove_quotas Remove quotes if necessary * @return string Decoded string */ function decode_header($input, $remove_quotes=false) @@ -3617,6 +3710,8 @@ class rcube_imap /** * Decode a part of a mime-encoded string * + * @param string $str String to decode + * @return string Decoded string * @access private */ private function _decode_mime_string_part($str) @@ -3647,8 +3742,8 @@ class rcube_imap /** * Decode a mime part * - * @param string Input string - * @param string Part encoding + * @param string $input Input string + * @param string $encoding Part encoding * @return string Decoded string */ function mime_decode($input, $encoding='7bit') @@ -3673,8 +3768,8 @@ class rcube_imap /** * Convert body charset to RCMAIL_CHARSET according to the ctype_parameters * - * @param string Part body to decode - * @param string Charset to convert from + * @param string $body Part body to decode + * @param string $ctype_param Charset to convert from * @return string Content converted to internal charset */ function charset_decode($body, $ctype_param) @@ -3693,6 +3788,9 @@ class rcube_imap /** * Validate the given input and save to local properties + * + * @param string $sort_field Sort column + * @param string $sort_order Sort order * @access private */ private function _set_sort_order($sort_field, $sort_order) @@ -3705,6 +3803,8 @@ class rcube_imap /** * Sort mailboxes first by default folders and then in alphabethical order + * + * @param array $a_folders Mailboxes list * @access private */ private function _sort_mailbox_list($a_folders) @@ -3762,6 +3862,9 @@ class rcube_imap /** + * @param int $uid User id + * @param string $mbox_name Mailbox name + * @return int * @access private */ private function _uid2id($uid, $mbox_name=NULL) @@ -3776,6 +3879,9 @@ class rcube_imap } /** + * @param int $id Id + * @param string $mbox_name Mailbox name + * @return int * @access private */ private function _id2uid($id, $mbox_name=NULL) @@ -3980,7 +4086,7 @@ class rcube_header_sorter /** * Set the predetermined sort order. * - * @param array Numerically indexed array of IMAP message sequence numbers + * @param array $seqnums Numerically indexed array of IMAP message sequence numbers */ function set_sequence_numbers($seqnums) { @@ -3990,7 +4096,7 @@ class rcube_header_sorter /** * Sort the array of header objects * - * @param array Array of rcube_mail_header objects indexed by UID + * @param array $headers Array of rcube_mail_header objects indexed by UID */ function sort_headers(&$headers) { @@ -4006,6 +4112,9 @@ class rcube_header_sorter /** * Sort method called by uasort() + * + * @param rcube_mail_header $a + * @param rcube_mail_header $b */ function compare_seqnums($a, $b) { diff --git a/program/include/rcube_json_output.php b/program/include/rcube_json_output.php index 970047212..3b95a4928 100644 --- a/program/include/rcube_json_output.php +++ b/program/include/rcube_json_output.php @@ -28,6 +28,11 @@ */ class rcube_json_output { + /** + * Stores configuration object. + * + * @var rcube_config + */ private $config; private $charset = RCMAIL_CHARSET; private $env = array(); @@ -54,8 +59,8 @@ class rcube_json_output /** * Set environment variable * - * @param string Property name - * @param mixed Property value + * @param string $name Property name + * @param mixed $value Property value */ public function set_env($name, $value) { @@ -66,7 +71,7 @@ class rcube_json_output /** * Issue command to set page title * - * @param string New page title + * @param string $title New page title */ public function set_pagetitle($title) { @@ -98,8 +103,8 @@ class rcube_json_output /** * Register a template object handler * - * @param string Object name - * @param string Function name to call + * @param string $obj Object name + * @param string $func Function name to call * @return void */ public function add_handler($obj, $func) @@ -111,7 +116,7 @@ class rcube_json_output /** * Register a list of template object handlers * - * @param array Hash array with object=>handler pairs + * @param array $arr Hash array with object=>handler pairs * @return void */ public function add_handlers($arr) @@ -155,10 +160,10 @@ class rcube_json_output /** * Invoke display_message command * - * @param string Message to display - * @param string Message type [notice|confirm|error] - * @param array Key-value pairs to be replaced in localized text - * @param boolean Override last set message + * @param string $message Message to display + * @param string $type Message type [notice|confirm|error] + * @param array $vars Key-value pairs to be replaced in localized text + * @param boolean $override Override last set message * @uses self::command() */ public function show_message($message, $type='notice', $vars=null, $override=true) @@ -188,7 +193,8 @@ class rcube_json_output /** * Redirect to a certain url * - * @param mixed Either a string with the action or url parameters as key-value pairs + * @param mixed $p Either a string with the action or url parameters as key-value pairs + * @param int $delay Delay in seconds * @see rcmail::url() */ public function redirect($p = array(), $delay = 1) @@ -212,7 +218,7 @@ class rcube_json_output /** * Send an AJAX response with executable JS code * - * @param string Additional JS code + * @param string $add Additional JS code * @param boolean True if output buffer should be flushed * @return void * @deprecated diff --git a/program/include/rcube_mdb2.php b/program/include/rcube_mdb2.php index a2baf33c0..3aaf3bd70 100644 --- a/program/include/rcube_mdb2.php +++ b/program/include/rcube_mdb2.php @@ -52,8 +52,8 @@ class rcube_mdb2 /** * Object constructor * - * @param string DSN for read/write operations - * @param string Optional DSN for read only operations + * @param string $db_dsnw DSN for read/write operations + * @param string $db_dsnr Optional DSN for read only operations */ function __construct($db_dsnw, $db_dsnr='', $pconn=false) { @@ -72,8 +72,8 @@ class rcube_mdb2 /** * Connect to specific database * - * @param string DSN for DB connections - * @return object PEAR database handle + * @param string $dsn DSN for DB connections + * @return MDB2 PEAR database handle * @access private */ private function dsn_connect($dsn) @@ -116,7 +116,7 @@ class rcube_mdb2 /** * Connect to appropiate database depending on the operation * - * @param string Connection mode (r|w) + * @param string $mode Connection mode (r|w) * @access public */ function db_connect($mode) @@ -149,7 +149,7 @@ class rcube_mdb2 /** * Activate/deactivate debug mode * - * @param boolean True if SQL queries should be logged + * @param boolean $dbg True if SQL queries should be logged * @access public */ function set_debug($dbg = true) @@ -227,10 +227,10 @@ class rcube_mdb2 /** * Execute a SQL query with limits * - * @param string SQL query to execute - * @param number Offset for LIMIT statement - * @param number Number of rows for LIMIT statement - * @param array Values to be inserted in query + * @param string $query SQL query to execute + * @param number $offset Offset for LIMIT statement + * @param number $numrows Number of rows for LIMIT statement + * @param array $params Values to be inserted in query * @return number Query handle identifier * @access private */ @@ -279,7 +279,7 @@ class rcube_mdb2 * Get number of rows for a SQL query * If no query handle is specified, the last query will be taken as reference * - * @param number Optional query handle identifier + * @param number $res_id Optional query handle identifier * @return mixed Number of rows or false on failure * @access public */ @@ -298,7 +298,7 @@ class rcube_mdb2 /** * Get number of affected rows for the last query * - * @param number Optional query handle identifier + * @param number $res_id Optional query handle identifier * @return mixed Number of rows or false on failure * @access public */ @@ -315,7 +315,7 @@ class rcube_mdb2 * Get last inserted record ID * For Postgres databases, a sequence name is required * - * @param string Table name (to find the incremented sequence) + * @param string $table Table name (to find the incremented sequence) * @return mixed ID or false on failure * @access public */ @@ -343,7 +343,7 @@ class rcube_mdb2 * Get an associative array for one row * If no query handle is specified, the last query will be taken as reference * - * @param number Optional query handle identifier + * @param number $res_id Optional query handle identifier * @return mixed Array with col values or false on failure * @access public */ @@ -358,7 +358,7 @@ class rcube_mdb2 * Get an index array for one row * If no query handle is specified, the last query will be taken as reference * - * @param number Optional query handle identifier + * @param number $res_id Optional query handle identifier * @return mixed Array with col values or false on failure * @access public */ @@ -372,8 +372,8 @@ class rcube_mdb2 /** * Get col values for a result row * - * @param object Query result handle - * @param number Fetch mode identifier + * @param MDB2_Result_Common Query $result result handle + * @param number $mode Fetch mode identifier * @return mixed Array with col values or false on failure * @access private */ @@ -411,8 +411,8 @@ class rcube_mdb2 /** * Formats input so it can be safely used in a query * - * @param mixed Value to quote - * @param string Type of data + * @param mixed $input Value to quote + * @param string $type Type of data * @return string Quoted/converted string for use in query * @access public */ @@ -433,7 +433,7 @@ class rcube_mdb2 /** * Quotes a string so it can be safely used as a table or column name * - * @param string Value to quote + * @param string $str Value to quote * @return string Quoted string for use in query * @deprecated Replaced by rcube_MDB2::quote_identifier * @see rcube_mdb2::quote_identifier @@ -448,7 +448,7 @@ class rcube_mdb2 /** * Quotes a string so it can be safely used as a table or column name * - * @param string Value to quote + * @param string $str Value to quote * @return string Quoted string for use in query * @access public */ @@ -464,7 +464,7 @@ class rcube_mdb2 /** * Escapes a string * - * @param string The string to be escaped + * @param string $str The string to be escaped * @return string The escaped string * @access public * @since 0.1.1 @@ -500,8 +500,8 @@ class rcube_mdb2 /** * Return list of elements for use with SQL's IN clause * - * @param array Input array - * @param string Type of data + * @param array $arr Input array + * @param string $type Type of data * @return string Comma-separated list of quoted values for use in query * @access public */ @@ -520,7 +520,7 @@ class rcube_mdb2 /** * Return SQL statement to convert a field value into a unix timestamp * - * @param string Field name + * @param string $field Field name * @return string SQL statement to use in query * @access public */ @@ -543,7 +543,7 @@ class rcube_mdb2 /** * Return SQL statement to convert from a unix timestamp * - * @param string Field name + * @param string $timestamp Field name * @return string SQL statement to use in query * @access public */ @@ -564,8 +564,8 @@ class rcube_mdb2 /** * Return SQL statement for case insensitive LIKE * - * @param string Field name - * @param string Search value + * @param string $column Field name + * @param string $value Search value * @return string SQL statement to use in query * @access public */ @@ -584,7 +584,7 @@ class rcube_mdb2 /** * Encodes non-UTF-8 characters in string/array/object (recursive) * - * @param mixed Data to fix + * @param mixed $input Data to fix * @return mixed Properly UTF-8 encoded data * @access public */ @@ -608,7 +608,7 @@ class rcube_mdb2 /** * Decodes encoded UTF-8 string/object/array (recursive) * - * @param mixed Input data + * @param mixed $input Input data * @return mixed Decoded data * @access public */ @@ -632,7 +632,7 @@ class rcube_mdb2 /** * Adds a query result and returns a handle ID * - * @param object Query handle + * @param object $res Query handle * @return mixed Handle ID * @access private */ @@ -660,7 +660,7 @@ class rcube_mdb2 * Resolves a given handle ID and returns the according query handle * If no ID is specified, the last resource handle will be returned * - * @param number Handle ID + * @param number $res_id Handle ID * @return mixed Resource handle or false on failure * @access private */ @@ -680,8 +680,8 @@ class rcube_mdb2 /** * Create a sqlite database from a file * - * @param object SQLite database handle - * @param string File path to use for DB creation + * @param MDB2 $dbh SQLite database handle + * @param string $file_name File path to use for DB creation * @access private */ private function _sqlite_create_database($dbh, $file_name) diff --git a/program/include/rcube_message.php b/program/include/rcube_message.php index 558b8ec13..4351f17f5 100644 --- a/program/include/rcube_message.php +++ b/program/include/rcube_message.php @@ -29,7 +29,18 @@ */ class rcube_message { + /** + * Instace of rcmail. + * + * @var rcmail + */ private $app; + + /** + * Instance of imap class + * + * @var rcube_imap + */ private $imap; private $opt = array(); private $inline_parts = array(); @@ -98,8 +109,8 @@ class rcube_message /** * Return a (decoded) message header * - * @param string Header name - * @param bool Don't mime-decode the value + * @param string $name Header name + * @param bool $row Don't mime-decode the value * @return string Header value */ public function get_header($name, $raw = false) @@ -112,7 +123,7 @@ class rcube_message /** * Set is_safe var and session data * - * @param bool enable/disable + * @param bool $safe enable/disable */ public function set_safe($safe = true) { @@ -124,7 +135,7 @@ class rcube_message /** * Compose a valid URL for getting a message part * - * @param string Part MIME-ID + * @param string $mime_id Part MIME-ID * @return string URL or false if part does not exist */ public function get_part_url($mime_id) @@ -139,8 +150,8 @@ class rcube_message /** * Get content of a specific part of this message * - * @param string Part MIME-ID - * @param resource File pointer to save the message part + * @param string $mime_id Part MIME-ID + * @param resource $fp File pointer to save the message part * @return string Part content */ public function get_part_content($mime_id, $fp=NULL) @@ -241,8 +252,8 @@ class rcube_message * Raad the message structure returend by the IMAP server * and build flat lists of content parts and attachments * - * @param object rcube_message_part Message structure node - * @param bool True when called recursively + * @param rcube_message_part $structure Message structure node + * @param bool $recursive True when called recursively */ private function parse_structure($structure, $recursive = false) { @@ -501,7 +512,7 @@ class rcube_message /** * Fill aflat array with references to all parts, indexed by part numbers * - * @param object rcube_message_part Message body structure + * @param rcube_message_part $part Message body structure */ private function get_mime_numbers(&$part) { @@ -517,7 +528,8 @@ class rcube_message /** * Decode a Microsoft Outlook TNEF part (winmail.dat) * - * @param object rcube_message_part Message part to decode + * @param rcube_message_part $part Message part to decode + * @return array */ function tnef_decode(&$part) { @@ -552,7 +564,8 @@ class rcube_message /** * Parse message body for UUencoded attachments bodies * - * @param object rcube_message_part Message part to decode + * @param rcube_message_part $part Message part to decode + * @return array */ function uu_decode(&$part) { @@ -598,7 +611,7 @@ class rcube_message /** * Interpret a format=flowed message body according to RFC 2646 * - * @param string Raw body formatted as flowed text + * @param string $text Raw body formatted as flowed text * @return string Interpreted text with unwrapped lines and stuffed space removed */ public static function unfold_flowed($text) @@ -654,6 +667,10 @@ class rcube_message /** * Wrap the given text to comply with RFC 2646 + * + * @param string $text Text to wrap + * @param int $length Length + * @return string Wrapped text */ public static function format_flowed($text, $length = 72) { diff --git a/program/include/rcube_plugin.php b/program/include/rcube_plugin.php index 5e5f56496..0c7f56648 100644 --- a/program/include/rcube_plugin.php +++ b/program/include/rcube_plugin.php @@ -27,6 +27,12 @@ abstract class rcube_plugin { public $ID; + + /** + * Holds an istance of Plugin API + * + * @var rcube_plugin_api + */ public $api; public $task; protected $home; @@ -35,6 +41,8 @@ abstract class rcube_plugin /** * Default constructor. + * + * @param rcube_plugin_api $api Plugin API */ public function __construct($api) { @@ -53,7 +61,7 @@ abstract class rcube_plugin * Load local config file from plugins directory. * The loaded values are patched over the global configuration. * - * @param string Config file name relative to the plugin's folder + * @param string $fname Config file name relative to the plugin's folder * @return boolean True on success, false on failure */ public function load_config($fname = 'config.inc.php') @@ -73,8 +81,8 @@ abstract class rcube_plugin /** * Register a callback function for a specific (server-side) hook * - * @param string Hook name - * @param mixed Callback function as string or array with object reference and method name + * @param string $hook Hook name + * @param mixed $callback Callback function as string or array with object reference and method name */ public function add_hook($hook, $callback) { @@ -84,8 +92,8 @@ abstract class rcube_plugin /** * Load localized texts from the plugins dir * - * @param string Directory to search in - * @param mixed Make texts also available on the client (array with list or true for all) + * @param string $dir Directory to search in + * @param mixed $add2client Make texts also available on the client (array with list or true for all) */ public function add_texts($dir, $add2client = false) { @@ -120,6 +128,7 @@ abstract class rcube_plugin /** * Wrapper for rcmail::gettext() adding the plugin ID as domain * + * @param string $p Message identifier * @return string Localized text * @see rcmail::gettext() */ @@ -131,7 +140,7 @@ abstract class rcube_plugin /** * Register this plugin to be responsible for a specific task * - * @param string Task name (only characters [a-z0-9_.-] are allowed) + * @param string $task Task name (only characters [a-z0-9_.-] are allowed) */ public function register_task($task) { @@ -144,8 +153,8 @@ abstract class rcube_plugin * * The callback will be executed upon a request like /?_task=mail&_action=plugin.myaction * - * @param string Action name (should be unique) - * @param mixed Callback function as string or array with object reference and method name + * @param string $action Action name (should be unique) + * @param mixed $callback Callback function as string or array with object reference and method name */ public function register_action($action, $callback) { @@ -158,8 +167,8 @@ abstract class rcube_plugin * When parsing a template for display, tags like <roundcube:object name="plugin.myobject" /> * will be replaced by the return value if the registered callback function. * - * @param string Object name (should be unique and start with 'plugin.') - * @param mixed Callback function as string or array with object reference and method name + * @param string $name Object name (should be unique and start with 'plugin.') + * @param mixed $callback Callback function as string or array with object reference and method name */ public function register_handler($name, $callback) { @@ -169,7 +178,7 @@ abstract class rcube_plugin /** * Make this javascipt file available on the client * - * @param string File path; absolute or relative to the plugin directory + * @param string $fn File path; absolute or relative to the plugin directory */ public function include_script($fn) { @@ -179,7 +188,7 @@ abstract class rcube_plugin /** * Make this stylesheet available on the client * - * @param string File path; absolute or relative to the plugin directory + * @param string $fn File path; absolute or relative to the plugin directory */ public function include_stylesheet($fn) { @@ -189,8 +198,8 @@ abstract class rcube_plugin /** * Append a button to a certain container * - * @param array Hash array with named parameters (as used in skin templates) - * @param string Container name where the buttons should be added to + * @param array $p Hash array with named parameters (as used in skin templates) + * @param string $container Container name where the buttons should be added to * @see rcube_remplate::button() */ public function add_button($p, $container) @@ -209,7 +218,7 @@ abstract class rcube_plugin * Generate an absolute URL to the given resource within the current * plugin directory * - * @param string The file name + * @param string $fn The file name * @return string Absolute URL to the given resource */ public function url($fn) @@ -219,6 +228,8 @@ abstract class rcube_plugin /** * Make the given file name link into the plugin directory + * + * @param string $fn Filename */ private function resource_url($fn) { @@ -244,6 +255,9 @@ abstract class rcube_plugin /** * Callback function for array_map + * + * @param string $key Array key. + * @return string */ private function label_map_callback($key) { diff --git a/program/include/rcube_plugin_api.php b/program/include/rcube_plugin_api.php index 9ad28e252..2313d6951 100644 --- a/program/include/rcube_plugin_api.php +++ b/program/include/rcube_plugin_api.php @@ -76,7 +76,7 @@ class rcube_plugin_api /** * This implements the 'singleton' design pattern * - * @return object rcube_plugin_api The one and only instance if this class + * @return rcube_plugin_api The one and only instance if this class */ static function get_instance() { @@ -189,8 +189,8 @@ class rcube_plugin_api /** * Allows a plugin object to register a callback for a certain hook * - * @param string Hook name - * @param mixed String with global function name or array($obj, 'methodname') + * @param string $hook Hook name + * @param mixed $callback String with global function name or array($obj, 'methodname') */ public function register_hook($hook, $callback) { @@ -214,8 +214,8 @@ class rcube_plugin_api * Triggers a plugin hook. * This is called from the application and executes all registered handlers * - * @param string Hook name - * @param array Named arguments (key->value pairs) + * @param string $hook Hook name + * @param array $args Named arguments (key->value pairs) * @return array The (probably) altered hook arguments */ public function exec_hook($hook, $args = array()) @@ -243,10 +243,10 @@ class rcube_plugin_api /** * Let a plugin register a handler for a specific request * - * @param string Action name (_task=mail&_action=plugin.foo) - * @param string Plugin name that registers this action - * @param mixed Callback: string with global function name or array($obj, 'methodname') - * @param string Task name registered by this plugin + * @param string $action Action name (_task=mail&_action=plugin.foo) + * @param string $owner Plugin name that registers this action + * @param mixed $callback Callback: string with global function name or array($obj, 'methodname') + * @param string $task Task name registered by this plugin */ public function register_action($action, $owner, $callback, $task = null) { @@ -273,7 +273,7 @@ class rcube_plugin_api * This method handles requests like _task=mail&_action=plugin.foo * It executes the callback function that was registered with the given action. * - * @param string Action name + * @param string $action Action name */ public function exec_action($action) { @@ -291,9 +291,9 @@ class rcube_plugin_api /** * Register a handler function for template objects * - * @param string Object name - * @param string Plugin name that registers this action - * @param mixed Callback: string with global function name or array($obj, 'methodname') + * @param string $name Object name + * @param string $owner Plugin name that registers this action + * @param mixed $callback Callback: string with global function name or array($obj, 'methodname') */ public function register_handler($name, $owner, $callback) { @@ -317,8 +317,8 @@ class rcube_plugin_api /** * Register this plugin to be responsible for a specific task * - * @param string Task name (only characters [a-z0-9_.-] are allowed) - * @param string Plugin name that registers this action + * @param string $task Task name (only characters [a-z0-9_.-] are allowed) + * @param string $owner Plugin name that registers this action */ public function register_task($task, $owner) { @@ -345,6 +345,7 @@ class rcube_plugin_api /** * Checks whether the given task is registered by a plugin * + * @param string $task Task name * @return boolean True if registered, otherwise false */ public function is_plugin_task($task) @@ -357,7 +358,7 @@ class rcube_plugin_api * Check if a plugin hook is currently processing. * Mainly used to prevent loops and recursion. * - * @param string Hook to check (optional) + * @param string $hook Hook to check (optional) * @return boolean True if any/the given hook is currently processed, otherwise false */ public function is_processing($hook = null) @@ -367,6 +368,8 @@ class rcube_plugin_api /** * Include a plugin script file in the current HTML page + * + * @param string $fn Path to script */ public function include_script($fn) { @@ -378,6 +381,8 @@ class rcube_plugin_api /** * Include a plugin stylesheet in the current HTML page + * + * @param string $fn Path to stylesheet */ public function include_stylesheet($fn) { @@ -389,6 +394,9 @@ class rcube_plugin_api /** * Save the given HTML content to be added to a template container + * + * @param string $html HTML content + * @param string $container Template container identifier */ public function add_content($html, $container) { @@ -397,6 +405,9 @@ class rcube_plugin_api /** * Callback for template_container hooks + * + * @param array $attrib + * @return array */ private function template_container_hook($attrib) { @@ -406,6 +417,9 @@ class rcube_plugin_api /** * Make the given file name link into the plugins directory + * + * @param string $fn Filename + * @return string */ private function resource_url($fn) { diff --git a/program/include/rcube_user.php b/program/include/rcube_user.php index abd53134c..e4506cff7 100644 --- a/program/include/rcube_user.php +++ b/program/include/rcube_user.php @@ -33,13 +33,19 @@ class rcube_user public $data = null; public $language = null; + /** + * Holds database connection. + * + * @var rcube_mdb2 + */ private $db = null; /** * Object constructor * - * @param object DB Database connection + * @param int $id User id + * @param array $sql_arr SQL result set */ function __construct($id = null, $sql_arr = null) { @@ -62,7 +68,7 @@ class rcube_user /** * Build a user name string (as e-mail address) * - * @param string Username part (empty or 'local' or 'domain') + * @param string $part Username part (empty or 'local' or 'domain') * @return string Full user name or its part */ function get_username($part = null) @@ -114,7 +120,7 @@ class rcube_user /** * Write the given user prefs to the user's record * - * @param array User prefs to save + * @param array $a_user_prefs User prefs to save * @return boolean True on success, False on failure */ function save_prefs($a_user_prefs) @@ -161,7 +167,7 @@ class rcube_user /** * Get default identity of this user * - * @param int Identity ID. If empty, the default identity is returned + * @param int $id Identity ID. If empty, the default identity is returned * @return array Hash array with all cols of the identity record */ function get_identity($id = null) @@ -174,6 +180,7 @@ class rcube_user /** * Return a list of all identities linked with this user * + * @param string $sql_add Optional WHERE clauses * @return array List of identities */ function list_identities($sql_add = '') @@ -198,8 +205,8 @@ class rcube_user /** * Update a specific identity record * - * @param int Identity ID - * @param array Hash array with col->value pairs to save + * @param int $iid Identity ID + * @param array $data Hash array with col->value pairs to save * @return boolean True if saved successfully, false if nothing changed */ function update_identity($iid, $data) @@ -232,7 +239,7 @@ class rcube_user /** * Create a new identity record linked with this user * - * @param array Hash array with col->value pairs to save + * @param array $data Hash array with col->value pairs to save * @return int The inserted identity ID or false on error */ function insert_identity($data) @@ -264,7 +271,7 @@ class rcube_user /** * Mark the given identity as deleted * - * @param int Identity ID + * @param int $iid Identity ID * @return boolean True if deleted successfully, false if nothing changed */ function delete_identity($iid) @@ -298,7 +305,7 @@ class rcube_user /** * Make this identity the default one for this user * - * @param int The identity ID + * @param int $iid The identity ID */ function set_default($iid) { @@ -343,9 +350,9 @@ class rcube_user /** * Find a user record matching the given name and host * - * @param string IMAP user name - * @param string IMAP host name - * @return object rcube_user New user instance + * @param string $user IMAP user name + * @param string $host IMAP host name + * @return rcube_user New user instance */ static function query($user, $host) { @@ -372,9 +379,9 @@ class rcube_user /** * Create a new user record and return a rcube_user instance * - * @param string IMAP user name - * @param string IMAP host - * @return object rcube_user New user instance + * @param string $user IMAP user name + * @param string $host IMAP host + * @return rcube_user New user instance */ static function create($user, $host) { @@ -471,7 +478,7 @@ class rcube_user /** * Resolve username using a virtuser plugins * - * @param string E-mail address to resolve + * @param string $email E-mail address to resolve * @return string Resolved IMAP username */ static function email2user($email) @@ -487,9 +494,9 @@ class rcube_user /** * Resolve e-mail address from virtuser plugins * - * @param string User name - * @param boolean If true returns first found entry - * @param boolean If true returns email as array (email and name for identity) + * @param string $user User name + * @param boolean $first If true returns first found entry + * @param boolean $extended If true returns email as array (email and name for identity) * @return mixed Resolved e-mail address string or array of strings */ static function user2email($user, $first=true, $extended=false) |