@@ -196,18 +196,27 @@ discard block |
||
196 | 196 | return $this->connection->MetaTables(); |
197 | 197 | } |
198 | 198 | |
199 | + /** |
|
200 | + * @return string |
|
201 | + */ |
|
199 | 202 | function MetaColumns($tab, $upper=true, $schema=false) |
200 | 203 | { |
201 | 204 | if (!$this->connection->IsConnected()) return array(); |
202 | 205 | return $this->connection->MetaColumns($this->TableName($tab), $upper, $schema); |
203 | 206 | } |
204 | 207 | |
208 | + /** |
|
209 | + * @param string $tab |
|
210 | + */ |
|
205 | 211 | function MetaPrimaryKeys($tab,$owner=false,$intkey=false) |
206 | 212 | { |
207 | 213 | if (!$this->connection->IsConnected()) return array(); |
208 | 214 | return $this->connection->MetaPrimaryKeys($this->TableName($tab), $owner, $intkey); |
209 | 215 | } |
210 | 216 | |
217 | + /** |
|
218 | + * @param string $table |
|
219 | + */ |
|
211 | 220 | function MetaIndexes($table, $primary = false, $owner = false) |
212 | 221 | { |
213 | 222 | if (!$this->connection->IsConnected()) return array(); |
@@ -304,6 +313,11 @@ discard block |
||
304 | 313 | N: Numeric or decimal number |
305 | 314 | */ |
306 | 315 | |
316 | + /** |
|
317 | + * @param string $meta |
|
318 | + * |
|
319 | + * @return string |
|
320 | + */ |
|
307 | 321 | function ActualType($meta) |
308 | 322 | { |
309 | 323 | return $meta; |
@@ -325,6 +339,10 @@ discard block |
||
325 | 339 | /* |
326 | 340 | Generates the SQL to create index. Returns an array of sql strings. |
327 | 341 | */ |
342 | + |
|
343 | + /** |
|
344 | + * @param string $tabname |
|
345 | + */ |
|
328 | 346 | function CreateIndexSQL($idxname, $tabname, $flds, $idxoptions = false) |
329 | 347 | { |
330 | 348 | if (!is_array($flds)) { |
@@ -339,6 +357,9 @@ discard block |
||
339 | 357 | return $this->_IndexSQL($this->NameQuote($idxname), $this->TableName($tabname), $flds, $this->_Options($idxoptions)); |
340 | 358 | } |
341 | 359 | |
360 | + /** |
|
361 | + * @param string $tabname |
|
362 | + */ |
|
342 | 363 | function DropIndexSQL ($idxname, $tabname = NULL) |
343 | 364 | { |
344 | 365 | return array(sprintf($this->dropIndex, $this->NameQuote($idxname), $this->TableName($tabname))); |
@@ -349,6 +370,10 @@ discard block |
||
349 | 370 | $this->schema = $schema; |
350 | 371 | } |
351 | 372 | |
373 | + /** |
|
374 | + * @param string $tabname |
|
375 | + * @param string $flds |
|
376 | + */ |
|
352 | 377 | function AddColumnSQL($tabname, $flds) |
353 | 378 | { |
354 | 379 | $tabname = $this->TableName ($tabname); |
@@ -392,7 +417,7 @@ discard block |
||
392 | 417 | * @param string $oldcolumn column-name to be renamed |
393 | 418 | * @param string $newcolumn new column-name |
394 | 419 | * @param string $flds='' complete column-defintion-string like for AddColumnSQL, only used by mysql atm., default='' |
395 | - * @return array with SQL strings |
|
420 | + * @return string[] with SQL strings |
|
396 | 421 | */ |
397 | 422 | function RenameColumnSQL($tabname,$oldcolumn,$newcolumn,$flds='') |
398 | 423 | { |
@@ -433,6 +458,10 @@ discard block |
||
433 | 458 | return array (sprintf($this->dropTable, $this->TableName($tabname))); |
434 | 459 | } |
435 | 460 | |
461 | + /** |
|
462 | + * @param string $tabname |
|
463 | + * @param string $newname |
|
464 | + */ |
|
436 | 465 | function RenameTableSQL($tabname,$newname) |
437 | 466 | { |
438 | 467 | return array (sprintf($this->renameTable, $this->TableName($tabname),$this->TableName($newname))); |
@@ -613,6 +642,11 @@ discard block |
||
613 | 642 | |
614 | 643 | |
615 | 644 | // return string must begin with space |
645 | + |
|
646 | + /** |
|
647 | + * @param boolean $fautoinc |
|
648 | + * @param boolean $funsigned |
|
649 | + */ |
|
616 | 650 | function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned) |
617 | 651 | { |
618 | 652 | $suffix = ''; |
@@ -55,6 +55,10 @@ |
||
55 | 55 | return isset($ADODB_LANG_ARRAY[$value]) ? $ADODB_LANG_ARRAY[$value] : $ADODB_LANG_ARRAY[DB_ERROR]; |
56 | 56 | } |
57 | 57 | |
58 | +/** |
|
59 | + * @param string $provider |
|
60 | + * @param string $dbType |
|
61 | + */ |
|
58 | 62 | function adodb_error($provider,$dbType,$errno) |
59 | 63 | { |
60 | 64 | //var_dump($errno); |
@@ -25,6 +25,9 @@ |
||
25 | 25 | |
26 | 26 | private $rs; |
27 | 27 | |
28 | + /** |
|
29 | + * @param ADODB_BASE_RS $rs |
|
30 | + */ |
|
28 | 31 | function __construct($rs) |
29 | 32 | { |
30 | 33 | $this->rs = $rs; |
@@ -32,6 +32,11 @@ discard block |
||
32 | 32 | return $an_array; |
33 | 33 | } |
34 | 34 | |
35 | +/** |
|
36 | + * @param ADOConnection $zthis |
|
37 | + * @param boolean $autoQuote |
|
38 | + * @param boolean $has_autoinc |
|
39 | + */ |
|
35 | 40 | function _adodb_replace(&$zthis, $table, $fieldArray, $keyCol, $autoQuote, $has_autoinc) |
36 | 41 | { |
37 | 42 | if (count($fieldArray) == 0) return 0; |
@@ -107,6 +112,9 @@ discard block |
||
107 | 112 | } |
108 | 113 | |
109 | 114 | // Requires $ADODB_FETCH_MODE = ADODB_FETCH_NUM |
115 | +/** |
|
116 | + * @param ADORecordSet $zthis |
|
117 | + */ |
|
110 | 118 | function _adodb_getmenu(&$zthis, $name,$defstr='',$blank1stItem=true,$multiple=false, |
111 | 119 | $size=0, $selectAttr='',$compareFields0=true) |
112 | 120 | { |
@@ -193,6 +201,9 @@ discard block |
||
193 | 201 | } |
194 | 202 | |
195 | 203 | // Requires $ADODB_FETCH_MODE = ADODB_FETCH_NUM |
204 | +/** |
|
205 | + * @param ADORecordSet $zthis |
|
206 | + */ |
|
196 | 207 | function _adodb_getmenu_gp(&$zthis, $name,$defstr='',$blank1stItem=true,$multiple=false, |
197 | 208 | $size=0, $selectAttr='',$compareFields0=true) |
198 | 209 | { |
@@ -376,6 +387,9 @@ discard block |
||
376 | 387 | data will get out of synch. use CachePageExecute() only with tables that |
377 | 388 | rarely change. |
378 | 389 | */ |
390 | +/** |
|
391 | + * @param ADOConnection $zthis |
|
392 | + */ |
|
379 | 393 | function &_adodb_pageexecute_all_rows(&$zthis, $sql, $nrows, $page, |
380 | 394 | $inputarr=false, $secs2cache=0) |
381 | 395 | { |
@@ -430,6 +444,9 @@ discard block |
||
430 | 444 | } |
431 | 445 | |
432 | 446 | // Iván Oliva version |
447 | +/** |
|
448 | + * @param ADOConnection $zthis |
|
449 | + */ |
|
433 | 450 | function &_adodb_pageexecute_no_last_page(&$zthis, $sql, $nrows, $page, $inputarr=false, $secs2cache=0) |
434 | 451 | { |
435 | 452 | |
@@ -480,6 +497,9 @@ discard block |
||
480 | 497 | return $rsreturn; |
481 | 498 | } |
482 | 499 | |
500 | +/** |
|
501 | + * @param ADOConnection $zthis |
|
502 | + */ |
|
483 | 503 | function _adodb_getupdatesql(&$zthis,&$rs, $arrFields,$forceUpdate=false,$magicq=false,$force=2) |
484 | 504 | { |
485 | 505 | if (!$rs) { |
@@ -615,6 +635,9 @@ discard block |
||
615 | 635 | } |
616 | 636 | } |
617 | 637 | |
638 | +/** |
|
639 | + * @param string $key |
|
640 | + */ |
|
618 | 641 | function adodb_key_exists($key, &$arr,$force=2) |
619 | 642 | { |
620 | 643 | if ($force<=0) { |
@@ -634,6 +657,7 @@ discard block |
||
634 | 657 | * a returning clause with bind variables and a descriptor blob. |
635 | 658 | * |
636 | 659 | * |
660 | + * @param ADOConnection $zthis |
|
637 | 661 | */ |
638 | 662 | function _adodb_getinsertsql(&$zthis,&$rs,$arrFields,$magicq=false,$force=2) |
639 | 663 | { |
@@ -898,6 +922,10 @@ discard block |
||
898 | 922 | |
899 | 923 | |
900 | 924 | |
925 | +/** |
|
926 | + * @param ADOConnection $zthis |
|
927 | + * @param boolean $inputarr |
|
928 | + */ |
|
901 | 929 | function _adodb_debug_execute(&$zthis, $sql, $inputarr) |
902 | 930 | { |
903 | 931 | $ss = ''; |
@@ -273,6 +273,12 @@ |
||
273 | 273 | |
274 | 274 | //------------------------------------------------------ |
275 | 275 | // override this to control overall layout and formating |
276 | + |
|
277 | + /** |
|
278 | + * @param string $header |
|
279 | + * @param string $grid |
|
280 | + * @param string $footer |
|
281 | + */ |
|
276 | 282 | function RenderLayout($header,$grid,$footer,$attributes='border=1 bgcolor=beige') |
277 | 283 | { |
278 | 284 | echo "<table ".$attributes."><tr><td>", |
@@ -48,6 +48,9 @@ discard block |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | // avoids localization problems where , is used instead of . |
51 | +/** |
|
52 | + * @param integer $prec |
|
53 | + */ |
|
51 | 54 | function adodb_round($n,$prec) |
52 | 55 | { |
53 | 56 | return number_format($n, $prec, '.', ''); |
@@ -547,6 +550,10 @@ discard block |
||
547 | 550 | /* |
548 | 551 | Raw function to return parameter value from $settings. |
549 | 552 | */ |
553 | + |
|
554 | + /** |
|
555 | + * @param string $param |
|
556 | + */ |
|
550 | 557 | function DBParameter($param) |
551 | 558 | { |
552 | 559 | if (empty($this->settings[$param])) return false; |
@@ -949,6 +956,9 @@ discard block |
||
949 | 956 | return $arr; |
950 | 957 | } |
951 | 958 | |
959 | + /** |
|
960 | + * @param string $m |
|
961 | + */ |
|
952 | 962 | function undomq(&$m) |
953 | 963 | { |
954 | 964 | if (get_magic_quotes_gpc()) { |
@@ -984,7 +994,7 @@ discard block |
||
984 | 994 | * <code>ADODB_OPT_LOW</code> for CPU-less optimization |
985 | 995 | * Default is LOW <code>ADODB_OPT_LOW</code> |
986 | 996 | * @author Markus Staab |
987 | - * @return Returns <code>true</code> on success and <code>false</code> on error |
|
997 | + * @return false|null <code>true</code> on success and <code>false</code> on error |
|
988 | 998 | */ |
989 | 999 | function OptimizeTables() |
990 | 1000 | { |
@@ -1015,7 +1025,7 @@ discard block |
||
1015 | 1025 | * <code>ADODB_OPT_LOW</code> for CPU-less optimization |
1016 | 1026 | * Default is LOW <code>ADODB_OPT_LOW</code> |
1017 | 1027 | * @author Markus Staab |
1018 | - * @return Returns <code>true</code> on success and <code>false</code> on error |
|
1028 | + * @return boolean <code>true</code> on success and <code>false</code> on error |
|
1019 | 1029 | */ |
1020 | 1030 | function OptimizeTable( $table, $mode = ADODB_OPT_LOW) |
1021 | 1031 | { |
@@ -1029,7 +1039,7 @@ discard block |
||
1029 | 1039 | * optimize each using <code>optmizeTable()</code> |
1030 | 1040 | * |
1031 | 1041 | * @author Markus Staab |
1032 | - * @return Returns <code>true</code> on success and <code>false</code> on error |
|
1042 | + * @return boolean <code>true</code> on success and <code>false</code> on error |
|
1033 | 1043 | */ |
1034 | 1044 | function optimizeDatabase() |
1035 | 1045 | { |
@@ -376,6 +376,10 @@ discard block |
||
376 | 376 | |
377 | 377 | if (!defined('ADODB_ALLOW_NEGATIVE_TS')) define('ADODB_NO_NEGATIVE_TS',1); |
378 | 378 | |
379 | +/** |
|
380 | + * @param integer $y1 |
|
381 | + * @param integer $m |
|
382 | + */ |
|
379 | 383 | function adodb_date_test_date($y1,$m,$d=13) |
380 | 384 | { |
381 | 385 | $t = adodb_mktime(0,0,0,$m,$d,$y1); |
@@ -387,6 +391,9 @@ discard block |
||
387 | 391 | return true; |
388 | 392 | } |
389 | 393 | |
394 | +/** |
|
395 | + * @param string $fmt |
|
396 | + */ |
|
390 | 397 | function adodb_date_test_strftime($fmt) |
391 | 398 | { |
392 | 399 | $s1 = strftime($fmt); |
@@ -231,8 +231,7 @@ discard block |
||
231 | 231 | /** |
232 | 232 | * Iniitializes a new table object. |
233 | 233 | * |
234 | - * @param string $prefix DB Object prefix |
|
235 | - * @param array $attributes Array of table attributes. |
|
234 | + * @param adoSchema $parent |
|
236 | 235 | */ |
237 | 236 | function dbTable( &$parent, $attributes = NULL ) { |
238 | 237 | $this->parent =& $parent; |
@@ -346,7 +345,7 @@ discard block |
||
346 | 345 | * Adds an index to a table object |
347 | 346 | * |
348 | 347 | * @param array $attributes Index attributes |
349 | - * @return object dbIndex object |
|
348 | + * @return dbIndex dbIndex object |
|
350 | 349 | */ |
351 | 350 | function &addIndex( $attributes ) { |
352 | 351 | $name = strtoupper( $attributes['NAME'] ); |
@@ -446,7 +445,7 @@ discard block |
||
446 | 445 | * and appends them to the table object. |
447 | 446 | * |
448 | 447 | * @param string $opt Table option |
449 | - * @return array Options |
|
448 | + * @return string[] Options |
|
450 | 449 | */ |
451 | 450 | function addTableOpt( $opt ) { |
452 | 451 | $this->opts[] = $opt; |
@@ -621,7 +620,7 @@ discard block |
||
621 | 620 | /** |
622 | 621 | * Initializes the new dbIndex object. |
623 | 622 | * |
624 | - * @param object $parent Parent object |
|
623 | + * @param dbTable $parent Parent object |
|
625 | 624 | * @param array $attributes Attributes |
626 | 625 | * |
627 | 626 | * @internal |
@@ -710,7 +709,7 @@ discard block |
||
710 | 709 | * Adds options to the index |
711 | 710 | * |
712 | 711 | * @param string $opt Comma-separated list of index options. |
713 | - * @return string Option list |
|
712 | + * @return string[] Option list |
|
714 | 713 | */ |
715 | 714 | function addIndexOpt( $opt ) { |
716 | 715 | $this->opts[] = $opt; |
@@ -765,7 +764,7 @@ discard block |
||
765 | 764 | /** |
766 | 765 | * Initializes the new dbIndex object. |
767 | 766 | * |
768 | - * @param object $parent Parent object |
|
767 | + * @param dbTable $parent Parent object |
|
769 | 768 | * @param array $attributes Attributes |
770 | 769 | * |
771 | 770 | * @internal |
@@ -833,8 +832,6 @@ discard block |
||
833 | 832 | /** |
834 | 833 | * Adds a field to the index |
835 | 834 | * |
836 | - * @param string $name Field name |
|
837 | - * @return string Field list |
|
838 | 835 | */ |
839 | 836 | function addField( $attributes ) { |
840 | 837 | if( isset( $attributes['NAME'] ) ) { |
@@ -850,8 +847,6 @@ discard block |
||
850 | 847 | /** |
851 | 848 | * Adds options to the index |
852 | 849 | * |
853 | - * @param string $opt Comma-separated list of index options. |
|
854 | - * @return string Option list |
|
855 | 850 | */ |
856 | 851 | function addData( $cdata ) { |
857 | 852 | if( !isset( $this->data[$this->row] ) ) { |
@@ -966,7 +961,7 @@ discard block |
||
966 | 961 | /** |
967 | 962 | * Initializes the query set. |
968 | 963 | * |
969 | - * @param object $parent Parent object |
|
964 | + * @param adoSchema $parent Parent object |
|
970 | 965 | * @param array $attributes Attributes |
971 | 966 | */ |
972 | 967 | function dbQuerySet( &$parent, $attributes = NULL ) { |
@@ -1080,8 +1075,6 @@ discard block |
||
1080 | 1075 | /** |
1081 | 1076 | * Appends a line to a query that is being built line by line |
1082 | 1077 | * |
1083 | - * @param string $data Line of SQL data or NULL to initialize a new query |
|
1084 | - * @return string SQL query string. |
|
1085 | 1078 | */ |
1086 | 1079 | function buildQuery( $sql = NULL ) { |
1087 | 1080 | if( !isset( $this->query ) OR empty( $sql ) ) { |
@@ -1394,9 +1387,6 @@ discard block |
||
1394 | 1387 | * the filesystem and generate the SQL necessary to create the database described. |
1395 | 1388 | * @see ParseSchemaString() |
1396 | 1389 | * |
1397 | - * @param string $file Name of XML schema file. |
|
1398 | - * @param bool $returnSchema Return schema rather than parsing. |
|
1399 | - * @return array Array of SQL queries, ready to execute |
|
1400 | 1390 | */ |
1401 | 1391 | function ParseSchema( $filename, $returnSchema = FALSE ) { |
1402 | 1392 | return $this->ParseSchemaString( $this->ConvertSchemaFile( $filename ), $returnSchema ); |
@@ -1408,12 +1398,6 @@ discard block |
||
1408 | 1398 | * Call this method to load the specified schema from a file (see the DTD for the proper format) |
1409 | 1399 | * and generate the SQL necessary to create the database described by the schema. |
1410 | 1400 | * |
1411 | - * @param string $file Name of XML schema file. |
|
1412 | - * @param bool $returnSchema Return schema rather than parsing. |
|
1413 | - * @return array Array of SQL queries, ready to execute. |
|
1414 | - * |
|
1415 | - * @deprecated Replaced by adoSchema::ParseSchema() and adoSchema::ParseSchemaString() |
|
1416 | - * @see ParseSchema(), ParseSchemaString() |
|
1417 | 1401 | */ |
1418 | 1402 | function ParseSchemaFile( $filename, $returnSchema = FALSE ) { |
1419 | 1403 | // Open the file |
@@ -1502,9 +1486,6 @@ discard block |
||
1502 | 1486 | * the filesystem and generate the SQL necessary to remove the database described. |
1503 | 1487 | * @see RemoveSchemaString() |
1504 | 1488 | * |
1505 | - * @param string $file Name of XML schema file. |
|
1506 | - * @param bool $returnSchema Return schema rather than parsing. |
|
1507 | - * @return array Array of SQL queries, ready to execute |
|
1508 | 1489 | */ |
1509 | 1490 | function RemoveSchema( $filename, $returnSchema = FALSE ) { |
1510 | 1491 | return $this->RemoveSchemaString( $this->ConvertSchemaFile( $filename ), $returnSchema ); |
@@ -1582,7 +1563,7 @@ discard block |
||
1582 | 1563 | * parsed XML schema) to the filesystem. |
1583 | 1564 | * |
1584 | 1565 | * @param string $filename Path and name where the file should be saved. |
1585 | - * @return boolean TRUE if save is successful, else FALSE. |
|
1566 | + * @return false|null TRUE if save is successful, else FALSE. |
|
1586 | 1567 | */ |
1587 | 1568 | function SaveSQL( $filename = './schema.sql' ) { |
1588 | 1569 | |
@@ -1604,7 +1585,7 @@ discard block |
||
1604 | 1585 | /** |
1605 | 1586 | * Create an xml parser |
1606 | 1587 | * |
1607 | - * @return object PHP XML parser object |
|
1588 | + * @return resource PHP XML parser object |
|
1608 | 1589 | * |
1609 | 1590 | * @access private |
1610 | 1591 | */ |
@@ -1748,6 +1729,10 @@ discard block |
||
1748 | 1729 | return $result; |
1749 | 1730 | } |
1750 | 1731 | |
1732 | + /** |
|
1733 | + * @param string $schema |
|
1734 | + * @param string $xsl |
|
1735 | + */ |
|
1751 | 1736 | function TransformSchema( $schema, $xsl, $schematype='string' ) |
1752 | 1737 | { |
1753 | 1738 | // Fail if XSLT extension is not available |
@@ -86,6 +86,9 @@ discard block |
||
86 | 86 | } |
87 | 87 | } |
88 | 88 | |
89 | + /** |
|
90 | + * @param string $meta |
|
91 | + */ |
|
89 | 92 | function ActualType($meta) |
90 | 93 | { |
91 | 94 | switch($meta) { |
@@ -261,6 +264,9 @@ discard block |
||
261 | 264 | return $aSql; |
262 | 265 | } |
263 | 266 | |
267 | + /** |
|
268 | + * @param string $tabname |
|
269 | + */ |
|
264 | 270 | function DropTableSQL($tabname) |
265 | 271 | { |
266 | 272 | $sql = ADODB_DataDict::DropTableSQL($tabname); |