]> granicus.if.org Git - php/commitdiff
fix phpdoc
authorAlexander Merz <alexmerz@php.net>
Thu, 13 Dec 2001 23:07:16 +0000 (23:07 +0000)
committerAlexander Merz <alexmerz@php.net>
Thu, 13 Dec 2001 23:07:16 +0000 (23:07 +0000)
pear/DB.php

index d5ca9ddeb4b2d1c4a241f8ba7e52cf7c9820baa9..48ec8e2d7d95fd60bdfd64047e7439213cec32cc 100644 (file)
@@ -189,10 +189,12 @@ class DB
      * Create a new DB connection object for the specified database
      * type
      *
-     * @param $type string database type, for example "mysql"
+     * @param string $type database type, for example "mysql"
      *
-     * @return object a newly created DB object, or a DB error code on
+     * @return mixed a newly created DB object, or a DB error code on
      * error
+     *
+     * access public     
      */
 
     function &factory($type)
@@ -215,22 +217,22 @@ class DB
      * Create a new DB connection object and connect to the specified
      * database
      *
-     * @param $dsn mixed "data source name", see the DB::parseDSN
+     * @param mixed $dsn "data source name", see the DB::parseDSN
      * method for a description of the dsn format.  Can also be
      * specified as an array of the format returned by DB::parseDSN.
      *
-     * @param $options mixed An associative array of option names and
+     * @param mixed $options An associative array of option names and
      * their values.  For backwards compatibility, this parameter may
      * also be a boolean that tells whether the connection should be
      * persistent.  See DB_common::setOption for more information on
      * connection options.
      *
-     * @return object a newly created DB connection object, or a DB
+     * @return mixed a newly created DB connection object, or a DB
      * error object on error
      *
      * @see DB::parseDSN
      * @see DB::isError
-     * @see DB_common::setOption
+     * @see DB_common::setOption     
      */
     function &connect($dsn, $options = false)
     {
@@ -281,6 +283,8 @@ class DB
      * Return the DB API version
      *
      * @return int the DB API version number
+     *
+     * @access public
      */
     function apiVersion()
     {
@@ -293,6 +297,8 @@ class DB
      * @param $value int result code
      *
      * @return bool whether $value is an error
+     *
+     * @access public
      */
     function isError($value)
     {
@@ -308,9 +314,9 @@ class DB
      *
      * @access public
      *
-     * @param string the query
+     * @param string $query the query
      *
-     * @return bool whether $query is a data manipulation query
+     * @return boolean whether $query is a data manipulation query
      */
     function isManip($query)
     {
@@ -327,9 +333,11 @@ class DB
      * Warnings differ from errors in that they are generated by DB,
      * and are not fatal.
      *
-     * @param $value mixed result value
+     * @param mixed $value result value
+     *
+     * @return boolean whether $value is a warning
      *
-     * @return bool whether $value is a warning
+     * @access public
      */
     function isWarning($value)
     {
@@ -341,7 +349,7 @@ class DB
     /**
      * Return a textual error message for a DB error code
      *
-     * @param $value int error code
+     * @param integer $value error code
      *
      * @return string error message, or false if the error code was
      * not recognized
@@ -391,10 +399,7 @@ class DB
     /**
      * Parse a data source name
      *
-     * @param $dsn string Data Source Name to be parsed
-     *
-     * @return array an associative array with the following keys:
-     *
+     * A array with the following keys will be returned:
      *  phptype: Database backend used in PHP (mysql, odbc etc.)
      *  dbsyntax: Database used with regards to SQL syntax etc.
      *  protocol: Communication protocol to use (tcp, unix etc.)
@@ -418,6 +423,10 @@ class DB
      *  phptype(dbsyntax)
      *  phptype
      *
+     * @param string $dsn Data Source Name to be parsed
+     *
+     * @return array an associative array 
+     *
      * @author Tomas V.V.Cox <cox@idecnet.com>
      */
     function parseDSN($dsn)
@@ -505,11 +514,11 @@ class DB
      *
      * @access public
      *
-     * @param $name the base name of the extension (without the .so or
-     * .dll suffix)
+     * @param string $name the base name of the extension (without the .so or
+     *                     .dll suffix)
      *
-     * @return bool true if the extension was already or successfully
-     * loaded, false if it could not be loaded
+     * @return boolean true if the extension was already or successfully
+     *                 loaded, false if it could not be loaded
      */
     function assertExtension($name)
     {
@@ -533,10 +542,10 @@ class DB_Error extends PEAR_Error
     /**
      * DB_Error constructor.
      *
-     * @param $code mixed DB error code, or string with error message.
-     * @param $mode int what "error mode" to operate in
-     * @param $level what error level to use for $mode & PEAR_ERROR_TRIGGER
-     * @param $debuginfo additional debug info, such as the last query
+     * @param mixed   $code      DB error code, or string with error message.
+     * @param integer $mode      what "error mode" to operate in
+     * @param integer $level     what error level to use for $mode & PEAR_ERROR_TRIGGER
+     * @param smixed  $debuginfo additional debug info, such as the last query
      *
      * @access public
      *
@@ -566,10 +575,10 @@ class DB_Warning extends PEAR_Error
     /**
      * DB_Warning constructor.
      *
-     * @param $code mixed DB error code, or string with error message.
-     * @param $mode int what "error mode" to operate in
-     * @param $level what error level to use for $mode == PEAR_ERROR_TRIGGER
-     * @param $debuginfo additional debug info, such as the last query
+     * @param mixed   $code      DB error code, or string with error message.
+     * @param integer $mode      what "error mode" to operate in
+     * @param integer $level     what error level to use for $mode == PEAR_ERROR_TRIGGER
+     * @param mmixed  $debuginfo additional debug info, such as the last query
      *
      * @access public
      *
@@ -604,8 +613,8 @@ class DB_result
 
     /**
      * DB_result constructor.
-     * @param   $dbh    DB object reference
-     * @param   $result result resource id
+     * @param   resource $dbh  DB object reference
+     * @param   resource $result result resource id
      */
 
     function DB_result(&$dbh, $result)
@@ -620,6 +629,8 @@ class DB_result
      * @param int $rownum     the row number to fetch
      *
      * @return  array a row of data, NULL on no more rows or PEAR_Error on error
+     *
+     * @access public
      */
     function fetchRow($fetchmode = DB_FETCHMODE_DEFAULT, $rownum=null)
     {
@@ -671,12 +682,14 @@ class DB_result
     /**
      * Fetch a row of data into an existing variable.
      *
-     * @param  mixed $arr        reference to data containing the row
-     * @param  int   $fetchmode  format of fetched row
-     * @param  int   $rownum     the row number to fetch
+     * @param  mixed     $arr        reference to data containing the row
+     * @param  integer   $fetchmode  format of fetched row
+     * @param  integer   $rownum     the row number to fetch
      *
      * @return  mixed  DB_OK on success, NULL on no more rows or
      *                 a DB_Error object on error
+     *
+     * @access public     
      */
     function fetchInto(&$arr, $fetchmode = DB_FETCHMODE_DEFAULT, $rownum=null)
     {
@@ -725,6 +738,8 @@ class DB_result
      * Get the the number of columns in a result set.
      *
      * @return int the number of columns, or a DB error
+     *
+     * @access public
      */
     function numCols()
     {
@@ -735,6 +750,8 @@ class DB_result
      * Get the number of rows in a result set.
      *
      * @return int the number of rows, or a DB error
+     *
+     * @access public     
      */
     function numRows()
     {
@@ -745,6 +762,8 @@ class DB_result
      * Get the next result if a batch of queries was executed.
      *
      * @return bool true if a new result is available or false if not.
+     *
+     * @access public     
      */
     function nextResult()
     {
@@ -754,6 +773,8 @@ class DB_result
     /**
      * Frees the resources allocated for this result set.
      * @return  int     error code
+     *
+     * @access public     
      */
     function free()
     {
@@ -765,11 +786,18 @@ class DB_result
         return true;
     }
 
+    /**
+    * @deprecated
+    */
     function tableInfo($mode = null)
     {
         return $this->dbh->tableInfo($this->result, $mode);
     }
 
+    /**
+    * returns the actual rows number
+    * @return integer
+    */    
     function getRowCounter()
     {
         return $this->row_counter;
@@ -782,6 +810,11 @@ class DB_result
 */
 class DB_row
 {
+    /**
+    * constructor
+    *
+    * @param resource row data as array
+    */ 
     function DB_row(&$arr)
     {
         for (reset($arr); $key = key($arr); next($arr)) {