From 7bb2cada63477039b67ee2038ba2f272d0bec4f9 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 29 Nov 2008 18:50:39 +0000 Subject: [PATCH] * fixed Doxygen errors in Database.php, DatabasePostgres.php, DatabaseOracle.php and DatabaseMssql.php * renamed \2types and \3types both to \types (with different number of param), Doxygen doesn't seem to like numbers in aliases * Added aliases for @private, @protected and @public --- includes/User.php | 21 ++- includes/db/Database.php | 214 ++++++++++++++++--------------- includes/db/DatabaseMssql.php | 53 ++++---- includes/db/DatabaseOracle.php | 10 +- includes/db/DatabasePostgres.php | 20 +-- maintenance/Doxyfile | 10 +- 6 files changed, 173 insertions(+), 155 deletions(-) diff --git a/includes/User.php b/includes/User.php index d6793b70fc..463d16346f 100644 --- a/includes/User.php +++ b/includes/User.php @@ -436,8 +436,7 @@ class User { /** * Get database id given a user name * @param $name \string Username - * @return \2types{\int,\null} The corresponding user's ID, or null if user is nonexistent - * @static + * @return \types{\int,\null} The corresponding user's ID, or null if user is nonexistent */ static function idFromName( $name ) { $nt = Title::makeTitleSafe( NS_USER, $name ); @@ -631,7 +630,7 @@ class User { * Given unvalidated user input, return a canonical username, or false if * the username is invalid. * @param $name \string User input - * @param $validate \2types{\string,\bool} Type of validation to use: + * @param $validate \types{\string,\bool} Type of validation to use: * - false No validation * - 'valid' Valid for batch processes * - 'usable' Valid for batch processes and login @@ -1487,7 +1486,7 @@ class User { * * @see getNewtalk() * @param $field \string 'user_ip' for anonymous users, 'user_id' otherwise - * @param $id \2types{\string,\int} User's IP address for anonymous users, User ID otherwise + * @param $id \types{\string,\int} User's IP address for anonymous users, User ID otherwise * @param $fromMaster \bool true to fetch from the master, false for a slave * @return \bool True if the user has new messages * @private @@ -1506,7 +1505,7 @@ class User { /** * Add or update the new messages flag * @param $field \string 'user_ip' for anonymous users, 'user_id' otherwise - * @param $id \2types{\string,\int} User's IP address for anonymous users, User ID otherwise + * @param $id \types{\string,\int} User's IP address for anonymous users, User ID otherwise * @return \bool True if successful, false otherwise * @private */ @@ -1528,7 +1527,7 @@ class User { /** * Clear the new messages flag for the given user * @param $field \string 'user_ip' for anonymous users, 'user_id' otherwise - * @param $id \2types{\string,\int} User's IP address for anonymous users, User ID otherwise + * @param $id \types{\string,\int} User's IP address for anonymous users, User ID otherwise * @return \bool True if successful, false otherwise * @private */ @@ -2712,7 +2711,7 @@ class User { * login credentials aren't being hijacked with a foreign form * submission. * - * @param $salt \2types{\string,\arrayof{\string}} Optional function-specific data for hashing + * @param $salt \types{\string,\arrayof{\string}} Optional function-specific data for hashing * @return \string The new edit token */ function editToken( $salt = '' ) { @@ -2778,7 +2777,7 @@ class User { * Generate a new e-mail confirmation token and send a confirmation/invalidation * mail to the user's given address. * - * @return \2types{\bool,\type{WikiError}} True on success, a WikiError object on failure. + * @return \types{\bool,\type{WikiError}} True on success, a WikiError object on failure. */ function sendConfirmationMail() { global $wgLang; @@ -2805,7 +2804,7 @@ class User { * @param $body \string Message body * @param $from \string Optional From address; if unspecified, default $wgPasswordSender will be used * @param $replyto \string Reply-To address - * @return \2types{\bool,\type{WikiError}} True on success, a WikiError object on failure + * @return \types{\bool,\type{WikiError}} True on success, a WikiError object on failure */ function sendMail( $subject, $body, $from = null, $replyto = null ) { if( is_null( $from ) ) { @@ -2983,7 +2982,7 @@ class User { /** * Get the timestamp of account creation. * - * @return \2types{\string,\bool} string Timestamp of account creation, or false for + * @return \types{\string,\bool} string Timestamp of account creation, or false for * non-existent/anonymous user accounts. */ public function getRegistration() { @@ -3106,7 +3105,7 @@ class User { * Get the title of a page describing a particular group * * @param $group \string Internal group name - * @return \2types{\type{Title},\bool} Title of the page if it exists, false otherwise + * @return \types{\type{Title},\bool} Title of the page if it exists, false otherwise */ static function getGroupPage( $group ) { global $wgMessageCache; diff --git a/includes/db/Database.php b/includes/db/Database.php index 1ca563ba54..83561d3782 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -207,13 +207,13 @@ class Database { /** * Return the last query that went through Database::query() - * @return string + * @return String */ function lastQuery() { return $this->mLastQuery; } /** * Is a connection to the database open? - * @return bool + * @return Boolean */ function isOpen() { return $this->mOpened; } @@ -248,13 +248,13 @@ class Database { # Other functions #------------------------------------------------------------------------------ - /**@{{ + /** * Constructor. - * @param string $server database server host - * @param string $user database user name - * @param string $password database user password - * @param string $dbname database name - * @param failFunction + * @param $server String: database server host + * @param $user String: database user name + * @param $password String: database user password + * @param $dbName String: database name + * @param $failFunction * @param $flags * @param $tablePrefix String: database table prefixes. By default use the prefix gave in LocalSettings.php */ @@ -298,7 +298,11 @@ class Database { } /** - * @static + * Same as new Database( ... ), kept for backward compatibility + * @param $server String: database server host + * @param $user String: database user name + * @param $password String: database user password + * @param $dbName String: database name * @param failFunction * @param $flags */ @@ -310,6 +314,10 @@ class Database { /** * Usually aborts on failure * If the failFunction is set to a non-zero integer, returns success + * @param $server String: database server host + * @param $user String: database user name + * @param $password String: database user password + * @param $dbName String: database name */ function open( $server, $user, $password, $dbName ) { global $wgAllDBsAreLocalhost; @@ -419,7 +427,6 @@ class Database { wfProfileOut( __METHOD__ ); return $success; } - /**@}}*/ protected function installErrorHandler() { $this->mPHPError = false; @@ -449,7 +456,7 @@ class Database { * Closes a database connection. * if it is open : commits any open transactions * - * @return bool operation success. true if already closed. + * @return Bool operation success. true if already closed. */ function close() { @@ -465,7 +472,7 @@ class Database { } /** - * @param string $error fallback error message, used if none is given by MySQL + * @param $error String: fallback error message, used if none is given by MySQL */ function reportConnectionError( $error = 'Unknown error' ) { $myError = $this->lastError(); @@ -491,7 +498,7 @@ class Database { * @param $sql String: SQL query * @param $fname String: Name of the calling function, for profiling/SHOW PROCESSLIST * comment (you can use __METHOD__ or add some extra info) - * @param $tempIgnore Bool: Whether to avoid throwing an exception on errors... + * @param $tempIgnore Boolean: Whether to avoid throwing an exception on errors... * maybe best to catch the exception instead? * @return true for a successful write query, ResultWrapper object for a successful read query, * or false on failure if $tempIgnore set @@ -595,7 +602,7 @@ class Database { * The DBMS-dependent part of query() * @param $sql String: SQL query. * @return Result object to feed to fetchObject, fetchRow, ...; or false on failure - * @access private + * @private */ /*private*/ function doQuery( $sql ) { if( $this->bufferResults() ) { @@ -607,11 +614,11 @@ class Database { } /** - * @param $error - * @param $errno - * @param $sql - * @param string $fname - * @param bool $tempIgnore + * @param $error String + * @param $errno Integer + * @param $sql String + * @param $fname String + * @param $tempIgnore Boolean */ function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false ) { global $wgCommandLineMode; @@ -653,8 +660,8 @@ class Database { /** * Execute a prepared query with the various arguments - * @param string $prepared the prepared sql - * @param mixed $args Either an array here, or put scalars as varargs + * @param $prepared String: the prepared sql + * @param $args Mixed: Either an array here, or put scalars as varargs */ function execute( $prepared, $args = null ) { if( !is_array( $args ) ) { @@ -669,8 +676,8 @@ class Database { /** * Prepare & execute an SQL statement, quoting and inserting arguments * in the appropriate places. - * @param string $query - * @param string $args ... + * @param $query String + * @param $args ... */ function safeQuery( $query, $args = null ) { $prepared = $this->prepare( $query, 'Database::safeQuery' ); @@ -687,8 +694,8 @@ class Database { /** * For faking prepared SQL statements on DBs that don't support * it directly. - * @param string $preparedSql - a 'preparable' SQL statement - * @param array $args - array of arguments to fill it with + * @param $preparedQuery String: a 'preparable' SQL statement + * @param $args Array of arguments to fill it with * @return string executable SQL */ function fillPrepared( $preparedQuery, $args ) { @@ -703,8 +710,8 @@ class Database { * The arguments should be in $this->preparedArgs and must not be touched * while we're doing this. * - * @param array $matches - * @return string + * @param $matches Array + * @return String * @private */ function fillPreparedArg( $matches ) { @@ -725,11 +732,9 @@ class Database { } } - /**#@+ - * @param mixed $res A SQL result - */ /** * Free a result object + * @param $res Mixed: A SQL result */ function freeResult( $res ) { if ( $res instanceof ResultWrapper ) { @@ -781,6 +786,7 @@ class Database { /** * Get the number of rows in a result object + * @param $res Mixed: A SQL result */ function numRows( $res ) { if ( $res instanceof ResultWrapper ) { @@ -796,6 +802,7 @@ class Database { /** * Get the number of fields in a result object * See documentation for mysql_num_fields() + * @param $res Mixed: A SQL result */ function numFields( $res ) { if ( $res instanceof ResultWrapper ) { @@ -808,6 +815,8 @@ class Database { * Get a field name in a result object * See documentation for mysql_field_name(): * http://www.php.net/mysql_field_name + * @param $res Mixed: A SQL result + * @param $n Integer */ function fieldName( $res, $n ) { if ( $res instanceof ResultWrapper ) { @@ -831,6 +840,8 @@ class Database { /** * Change the position of the cursor in a result object * See mysql_data_seek() + * @param $res Mixed: A SQL result + * @param $row Mixed: Either MySQL row or ResultWrapper */ function dataSeek( $res, $row ) { if ( $res instanceof ResultWrapper ) { @@ -877,7 +888,6 @@ class Database { * See mysql_affected_rows() for more details */ function affectedRows() { return mysql_affected_rows( $this->mConn ); } - /**#@-*/ // end of template : @param $result /** * Simple UPDATE wrapper @@ -887,8 +897,7 @@ class Database { * This function exists for historical reasons, Database::update() has a more standard * calling convention and feature set */ - function set( $table, $var, $value, $cond, $fname = 'Database::set' ) - { + function set( $table, $var, $value, $cond, $fname = 'Database::set' ) { $table = $this->tableName( $table ); $sql = "UPDATE $table SET $var = '" . $this->strencode( $value ) . "' WHERE ($cond)"; @@ -925,9 +934,9 @@ class Database { * * @private * - * @param array $options an associative array of options to be turned into + * @param $options Array: associative array of options to be turned into * an SQL query, valid keys are listed in the function. - * @return array + * @return Array */ function makeSelectOptions( $options ) { $preLimitTail = $postLimitTail = ''; @@ -976,14 +985,14 @@ class Database { /** * SELECT wrapper * - * @param mixed $table Array or string, table name(s) (prefix auto-added) - * @param mixed $vars Array or string, field name(s) to be retrieved - * @param mixed $conds Array or string, condition(s) for WHERE - * @param string $fname Calling function name (use __METHOD__) for logs/profiling - * @param array $options Associative array of options (e.g. array('GROUP BY' => 'page_title')), - * see Database::makeSelectOptions code for list of supported stuff - * @param array $join_conds Associative array of table join conditions (optional) - * (e.g. array( 'page' => array('LEFT JOIN','page_latest=rev_id') ) + * @param $table Mixed: Array or string, table name(s) (prefix auto-added) + * @param $vars Mixed: Array or string, field name(s) to be retrieved + * @param $conds Mixed: Array or string, condition(s) for WHERE + * @param $fname String: Calling function name (use __METHOD__) for logs/profiling + * @param $options Array: Associative array of options (e.g. array('GROUP BY' => 'page_title')), + * see Database::makeSelectOptions code for list of supported stuff + * @param $join_conds Array: Associative array of table join conditions (optional) + * (e.g. array( 'page' => array('LEFT JOIN','page_latest=rev_id') ) * @return mixed Database result resource (feed to Database::fetchObject or whatever), or false on failure */ function select( $table, $vars, $conds='', $fname = 'Database::select', $options = array(), $join_conds = array() ) @@ -995,14 +1004,14 @@ class Database { /** * SELECT wrapper * - * @param mixed $table Array or string, table name(s) (prefix auto-added) - * @param mixed $vars Array or string, field name(s) to be retrieved - * @param mixed $conds Array or string, condition(s) for WHERE - * @param string $fname Calling function name (use __METHOD__) for logs/profiling - * @param array $options Associative array of options (e.g. array('GROUP BY' => 'page_title')), - * see Database::makeSelectOptions code for list of supported stuff - * @param array $join_conds Associative array of table join conditions (optional) - * (e.g. array( 'page' => array('LEFT JOIN','page_latest=rev_id') ) + * @param $table Mixed: Array or string, table name(s) (prefix auto-added) + * @param $vars Mixed: Array or string, field name(s) to be retrieved + * @param $conds Mixed: Array or string, condition(s) for WHERE + * @param $fname String: Calling function name (use __METHOD__) for logs/profiling + * @param $options Array: Associative array of options (e.g. array('GROUP BY' => 'page_title')), + * see Database::makeSelectOptions code for list of supported stuff + * @param $join_conds Array: Associative array of table join conditions (optional) + * (e.g. array( 'page' => array('LEFT JOIN','page_latest=rev_id') ) * @return string, the SQL text */ function selectSQLText( $table, $vars, $conds='', $fname = 'Database::select', $options = array(), $join_conds = array() ) { @@ -1053,13 +1062,17 @@ class Database { * Single row SELECT wrapper * Aborts or returns FALSE on error * - * $vars: the selected variables - * $conds: a condition map, terms are ANDed together. + * @param $table String: table name + * @param $vars String: the selected variables + * @param $conds Array: a condition map, terms are ANDed together. * Items with numeric keys are taken to be literal conditions * Takes an array of selected variables, and a condition map, which is ANDed * e.g: selectRow( "page", array( "page_id" ), array( "page_namespace" => * NS_MAIN, "page_title" => "Astronomy" ) ) would return an object where * $obj- >page_id is the ID of the Astronomy article + * @param $fname String: Calling functio name + * @param $options Array + * @param $join_conds Array * * @todo migrate documentation to phpdocumentor format */ @@ -1109,8 +1122,7 @@ class Database { * Removes most variables from an SQL query and replaces them with X or N for numbers. * It's only slightly flawed. Don't use for anything important. * - * @param string $sql A SQL Query - * @static + * @param $sql String: A SQL Query */ static function generalizeSQL( $sql ) { # This does the same as the regexp below would do, but in such a way @@ -1303,7 +1315,7 @@ class Database { * Make UPDATE options for the Database::update function * * @private - * @param array $options The options passed to Database::update + * @param $options Array: The options passed to Database::update * @return string */ function makeUpdateOptions( $options ) { @@ -1321,14 +1333,14 @@ class Database { /** * UPDATE wrapper, takes a condition array and a SET array * - * @param string $table The table to UPDATE - * @param array $values An array of values to SET - * @param array $conds An array of conditions (WHERE). Use '*' to update all rows. - * @param string $fname The Class::Function calling this function - * (for the log) - * @param array $options An array of UPDATE options, can be one or + * @param $table String: The table to UPDATE + * @param $values Array: An array of values to SET + * @param $conds Array: An array of conditions (WHERE). Use '*' to update all rows. + * @param $fname String: The Class::Function calling this function + * (for the log) + * @param $options Array: An array of UPDATE options, can be one or * more of IGNORE, LOW_PRIORITY - * @return bool + * @return Boolean */ function update( $table, $values, $conds, $fname = 'Database::update', $options = array() ) { $table = $this->tableName( $table ); @@ -1433,8 +1445,8 @@ class Database { * themselves. Pass the canonical name to such functions. This is only needed * when calling query() directly. * - * @param string $name database table name - * @return string full database name + * @param $name String: database table name + * @return String: full database name */ function tableName( $name ) { global $wgSharedDB, $wgSharedPrefix, $wgSharedTables; @@ -1563,8 +1575,8 @@ class Database { /** * Wrapper for addslashes() - * @param string $s String to be slashed. - * @return string slashed string. + * @param $s String: to be slashed. + * @return String: slashed string. */ function strencode( $s ) { return mysql_real_escape_string( $s, $this->mConn ); @@ -1655,11 +1667,12 @@ class Database { * * DO NOT put the join condition in $conds * - * @param string $delTable The table to delete from. - * @param string $joinTable The other table. - * @param string $delVar The variable to join on, in the first table. - * @param string $joinVar The variable to join on, in the second table. - * @param array $conds Condition array of field names mapped to variables, ANDed together in the WHERE clause + * @param $delTable String: The table to delete from. + * @param $joinTable String: The other table. + * @param $delVar String: The variable to join on, in the first table. + * @param $joinVar String: The variable to join on, in the second table. + * @param $conds Array: Condition array of field names mapped to variables, ANDed together in the WHERE clause + * @param $fname String: Calling function name (use __METHOD__) for logs/profiling */ function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds, $fname = 'Database::deleteJoin' ) { if ( !$conds ) { @@ -1755,9 +1768,9 @@ class Database { /** * Construct a LIMIT query with optional offset * This is used for query pages - * $sql string SQL query we will append the limit too - * $limit integer the SQL limit - * $offset integer the SQL offset (default false) + * @param $sql String: SQL query we will append the limit too + * @param $limit Integer: the SQL limit + * @param $offset Integer the SQL offset (default false) */ function limitResult($sql, $limit, $offset=false) { if( !is_numeric($limit) ) { @@ -1775,10 +1788,10 @@ class Database { * Returns an SQL expression for a simple conditional. * Uses IF on MySQL. * - * @param string $cond SQL expression which will result in a boolean value - * @param string $trueVal SQL expression to return if true - * @param string $falseVal SQL expression to return if false - * @return string SQL fragment + * @param $cond String: SQL expression which will result in a boolean value + * @param $trueVal String: SQL expression to return if true + * @param $falseVal String: SQL expression to return if false + * @return String: SQL fragment */ function conditional( $cond, $trueVal, $falseVal ) { return " IF($cond, $trueVal, $falseVal) "; @@ -1788,9 +1801,9 @@ class Database { * Returns a comand for str_replace function in SQL query. * Uses REPLACE() in MySQL * - * @param string $orig String or column to modify - * @param string $old String or column to seek - * @param string $new String or column to replace with + * @param $orig String: column to modify + * @param $old String: column to seek + * @param $new String: column to replace with */ function strreplace( $orig, $old, $new ) { return "REPLACE({$orig}, {$old}, {$new})"; @@ -1861,9 +1874,8 @@ class Database { /** * Do a SELECT MASTER_POS_WAIT() * - * @param string $file the binlog file - * @param string $pos the binlog position - * @param integer $timeout the maximum number of seconds to wait for synchronisation + * @param $pos MySQLMasterPos object + * @param $timeout Integer: the maximum number of seconds to wait for synchronisation */ function masterPosWait( MySQLMasterPos $pos, $timeout ) { $fname = 'Database::masterPosWait'; @@ -2024,14 +2036,14 @@ class Database { } /** - * @return string wikitext of a link to the server software's web site + * @return String: wikitext of a link to the server software's web site */ function getSoftwareLink() { return "[http://www.mysql.com/ MySQL]"; } /** - * @return string Version information from the database + * @return String: Version information from the database */ function getServerVersion() { return mysql_get_server_info( $this->mConn ); @@ -2129,7 +2141,7 @@ class Database { * May be useful for very long batch queries such as * full-wiki dumps, where a single query reads out * over hours or days. - * @param int $timeout in seconds + * @param $timeout Integer in seconds */ public function setTimeout( $timeout ) { $this->query( "SET net_read_timeout=$timeout" ); @@ -2139,9 +2151,9 @@ class Database { /** * Read and execute SQL commands from a file. * Returns true on success, error string or exception on failure (depending on object's error ignore settings) - * @param string $filename File name to open - * @param callback $lineCallback Optional function called before reading each line - * @param callback $resultCallback Optional function called for each MySQL result + * @param $filename String: File name to open + * @param $lineCallback Callback: Optional function called before reading each line + * @param $resultCallback Callback: Optional function called for each MySQL result */ function sourceFile( $filename, $lineCallback = false, $resultCallback = false ) { $fp = fopen( $filename, 'r' ); @@ -2156,9 +2168,9 @@ class Database { /** * Read and execute commands from an open file handle * Returns true on success, error string or exception on failure (depending on object's error ignore settings) - * @param string $fp File handle - * @param callback $lineCallback Optional function called before reading each line - * @param callback $resultCallback Optional function called for each MySQL result + * @param $fp String: File handle + * @param $lineCallback Callback: Optional function called before reading each line + * @param $resultCallback Callback: Optional function called for each MySQL result */ function sourceStream( $fp, $lineCallback = false, $resultCallback = false ) { $cmd = ""; @@ -2263,8 +2275,8 @@ class Database { * Abstracted from Filestore::lock() so child classes can implement for * their own needs. * - * @param string $lockName Name of lock to aquire - * @param string $method Name of method calling us + * @param $lockName String: Name of lock to aquire + * @param $method String: Name of method calling us * @return bool */ public function lock( $lockName, $method ) { @@ -2286,8 +2298,8 @@ class Database { * @todo fixme - Figure out a way to return a bool * based on successful lock release. * - * @param string $lockName Name of lock to release - * @param string $method Name of method calling us + * @param $lockName String: Name of lock to release + * @param $method String: Name of method calling us */ public function unlock( $lockName, $method ) { $lockName = $this->addQuotes( $lockName ); @@ -2299,7 +2311,7 @@ class Database { * Get search engine class. All subclasses of this * need to implement this if they wish to use searching. * - * @return string + * @return String */ public function getSearchEngine() { return "SearchMySQL"; @@ -2423,8 +2435,8 @@ class DBError extends MWException { /** * Construct a database error - * @param Database $db The database object which threw the error - * @param string $error A simple error message to be used for debugging + * @param $db Database object which threw the error + * @param $error A simple error message to be used for debugging */ function __construct( Database &$db, $error ) { $this->db =& $db; diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php index 5a02f5e99c..28ccab2d24 100644 --- a/includes/db/DatabaseMssql.php +++ b/includes/db/DatabaseMssql.php @@ -154,9 +154,6 @@ class DatabaseMssql extends Database { return $ret; } - /**#@+ - * @param mixed $res A SQL result - */ /** * Free a result object */ @@ -225,6 +222,7 @@ class DatabaseMssql extends Database { /** * Get the number of fields in a result object * See documentation for mysql_num_fields() + * @param $res SQL result object as returned from Database::query(), etc. */ function numFields( $res ) { if ( $res instanceof ResultWrapper ) { @@ -237,6 +235,8 @@ class DatabaseMssql extends Database { * Get a field name in a result object * See documentation for mysql_field_name(): * http://www.php.net/mysql_field_name + * @param $res SQL result object as returned from Database::query(), etc. + * @param $n Int */ function fieldName( $res, $n ) { if ( $res instanceof ResultWrapper ) { @@ -263,6 +263,8 @@ class DatabaseMssql extends Database { /** * Change the position of the cursor in a result object * See mysql_data_seek() + * @param $res SQL result object as returned from Database::query(), etc. + * @param $row Database row */ function dataSeek( $res, $row ) { if ( $res instanceof ResultWrapper ) { @@ -339,7 +341,7 @@ class DatabaseMssql extends Database { * * @private * - * @param array $options an associative array of options to be turned into + * @param $options Array: an associative array of options to be turned into * an SQL query, valid keys are listed in the function. * @return array */ @@ -390,11 +392,11 @@ class DatabaseMssql extends Database { /** * SELECT wrapper * - * @param mixed $table Array or string, table name(s) (prefix auto-added) - * @param mixed $vars Array or string, field name(s) to be retrieved - * @param mixed $conds Array or string, condition(s) for WHERE - * @param string $fname Calling function name (use __METHOD__) for logs/profiling - * @param array $options Associative array of options (e.g. array('GROUP BY' => 'page_title')), + * @param $table Mixed: Array or string, table name(s) (prefix auto-added) + * @param $vars Mixed: Array or string, field name(s) to be retrieved + * @param $conds Mixed: Array or string, condition(s) for WHERE + * @param $fname String: Calling function name (use __METHOD__) for logs/profiling + * @param $options Array: Associative array of options (e.g. array('GROUP BY' => 'page_title')), * see Database::makeSelectOptions code for list of supported stuff * @return mixed Database result resource (feed to Database::fetchObject or whatever), or false on failure */ @@ -643,12 +645,12 @@ class DatabaseMssql extends Database { /** * UPDATE wrapper, takes a condition array and a SET array * - * @param string $table The table to UPDATE - * @param array $values An array of values to SET - * @param array $conds An array of conditions (WHERE). Use '*' to update all rows. - * @param string $fname The Class::Function calling this function - * (for the log) - * @param array $options An array of UPDATE options, can be one or + * @param $table String: The table to UPDATE + * @param $values Array: An array of values to SET + * @param $conds Array: An array of conditions (WHERE). Use '*' to update all rows. + * @param $fname String: The Class::Function calling this function + * (for the log) + * @param $options Array: An array of UPDATE options, can be one or * more of IGNORE, LOW_PRIORITY * @return bool */ @@ -666,7 +668,7 @@ class DatabaseMssql extends Database { * Make UPDATE options for the Database::update function * * @private - * @param array $options The options passed to Database::update + * @param $options Array: The options passed to Database::update * @return string */ function makeUpdateOptions( $options ) { @@ -698,7 +700,7 @@ class DatabaseMssql extends Database { /** * MSSQL doubles quotes instead of escaping them - * @param string $s String to be slashed. + * @param $s String to be slashed. * @return string slashed string. */ function strencode($s) { @@ -755,11 +757,12 @@ class DatabaseMssql extends Database { * * DO NOT put the join condition in $conds * - * @param string $delTable The table to delete from. - * @param string $joinTable The other table. - * @param string $delVar The variable to join on, in the first table. - * @param string $joinVar The variable to join on, in the second table. - * @param array $conds Condition array of field names mapped to variables, ANDed together in the WHERE clause + * @param $delTable String: The table to delete from. + * @param $joinTable String: The other table. + * @param $delVar String: The variable to join on, in the first table. + * @param $joinVar String: The variable to join on, in the second table. + * @param $conds Array: Condition array of field names mapped to variables, ANDed together in the WHERE clause + * @param $fname String: Calling function name */ function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds, $fname = 'Database::deleteJoin' ) { if ( !$conds ) { @@ -857,9 +860,9 @@ class DatabaseMssql extends Database { /** * Returns an SQL expression for a simple conditional. * - * @param string $cond SQL expression which will result in a boolean value - * @param string $trueVal SQL expression to return if true - * @param string $falseVal SQL expression to return if false + * @param $cond String: SQL expression which will result in a boolean value + * @param $trueVal String: SQL expression to return if true + * @param $falseVal String: SQL expression to return if false * @return string SQL fragment */ function conditional( $cond, $trueVal, $falseVal ) { diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index 67c8ffffc4..4c37a5077e 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -509,10 +509,10 @@ class DatabaseOracle extends Database { * Returns an SQL expression for a simple conditional. * Uses CASE on Oracle * - * @param string $cond SQL expression which will result in a boolean value - * @param string $trueVal SQL expression to return if true - * @param string $falseVal SQL expression to return if false - * @return string SQL fragment + * @param $cond String: SQL expression which will result in a boolean value + * @param $trueVal String: SQL expression to return if true + * @param $falseVal String: SQL expression to return if false + * @return String: SQL fragment */ function conditional( $cond, $trueVal, $falseVal ) { return " (CASE WHEN $cond THEN $trueVal ELSE $falseVal END) "; @@ -640,7 +640,7 @@ echo "error!\n"; * * @private * - * @param array $options an associative array of options to be turned into + * @param $options Array: an associative array of options to be turned into * an SQL query, valid keys are listed in the function. * @return array */ diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index 8b119e5ceb..00eddf5db1 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -723,10 +723,10 @@ class DatabasePostgres extends Database { * $args may be a single associative array, or an array of these with numeric keys, * for multi-row insert (Postgres version 8.2 and above only). * - * @param array $table String: Name of the table to insert to. - * @param array $args Array: Items to insert into the table. - * @param array $fname String: Name of the function, for profiling - * @param mixed $options String or Array. Valid options: IGNORE + * @param $table String: Name of the table to insert to. + * @param $args Array: Items to insert into the table. + * @param $fname String: Name of the function, for profiling + * @param $options String or Array. Valid options: IGNORE * * @return bool Success of insert operation. IGNORE always returns true. */ @@ -1001,10 +1001,10 @@ class DatabasePostgres extends Database { * Returns an SQL expression for a simple conditional. * Uses CASE on Postgres * - * @param string $cond SQL expression which will result in a boolean value - * @param string $trueVal SQL expression to return if true - * @param string $falseVal SQL expression to return if false - * @return string SQL fragment + * @param $cond String: SQL expression which will result in a boolean value + * @param $trueVal String: SQL expression to return if true + * @param $falseVal String: SQL expression to return if false + * @return String: SQL fragment */ function conditional( $cond, $trueVal, $falseVal ) { return " (CASE WHEN $cond THEN $trueVal ELSE $falseVal END) "; @@ -1305,7 +1305,7 @@ END; * * @private * - * @param string $com SQL string, read from a stream (usually tables.sql) + * @param $ins String: SQL string, read from a stream (usually tables.sql) * * @return string SQL string */ @@ -1330,7 +1330,7 @@ END; * * @private * - * @param array $options an associative array of options to be turned into + * @param $options Array: an associative array of options to be turned into * an SQL query, valid keys are listed in the function. * @return array */ diff --git a/maintenance/Doxyfile b/maintenance/Doxyfile index 9d97b32d0b..2f6141440c 100644 --- a/maintenance/Doxyfile +++ b/maintenance/Doxyfile @@ -279,8 +279,8 @@ DOT_CLEANUP = YES SEARCHENGINE = NO ALIASES = "type{1}= \1 :" \ - "2types{2}= \1 or \2 :" \ - "3types{3}= \1 , \2 , or \3 :" \ + "types{2}= \1 or \2 :" \ + "types{3}= \1 , \2 , or \3 :" \ "arrayof{2}= Array of \2" \ "null=\type{Null}" \ "boolean=\type{Boolean}" \ @@ -289,4 +289,8 @@ ALIASES = "type{1}= \1 :" \ "int=\integer" \ "string=\type{String}" \ "str=\string" \ - "mixed=\type{Mixed}" \ No newline at end of file + "mixed=\type{Mixed}" \ + "access=\n Access :\n" \ + "private=\access private" \ + "protected=\access protected" \ + "public=\access public" \ No newline at end of file -- 2.20.1