Changeset 1015
- Timestamp:
- 11/07/2007 05:18:26 PM (11 months ago)
- Location:
- trunk/system
- Files:
-
- 32 modified
-
core/Kohana.php (modified) (1 diff)
-
helpers/form.php (modified) (1 diff)
-
libraries/Archive.php (modified) (1 diff)
-
libraries/Cache.php (modified) (1 diff)
-
libraries/Calendar.php (modified) (1 diff)
-
libraries/Controller.php (modified) (1 diff)
-
libraries/Database.php (modified) (34 diffs)
-
libraries/Encrypt.php (modified) (1 diff)
-
libraries/Ftp.php (modified) (1 diff)
-
libraries/Input.php (modified) (1 diff)
-
libraries/Loader.php (modified) (1 diff)
-
libraries/Model.php (modified) (1 diff)
-
libraries/Pagination.php (modified) (1 diff)
-
libraries/Payment.php (modified) (5 diffs)
-
libraries/Profiler.php (modified) (2 diffs)
-
libraries/Session.php (modified) (1 diff)
-
libraries/URI.php (modified) (1 diff)
-
libraries/User_agent.php (modified) (1 diff)
-
libraries/Validation.php (modified) (1 diff)
-
libraries/View.php (modified) (1 diff)
-
libraries/drivers/Archive.php (modified) (2 diffs)
-
libraries/drivers/Archive_Zip.php (modified) (2 diffs)
-
libraries/drivers/Database.php (modified) (20 diffs)
-
libraries/drivers/Database_Mysql.php (modified) (37 diffs)
-
libraries/drivers/Database_Pgsql.php (modified) (7 diffs)
-
libraries/drivers/Image.php (modified) (1 diff)
-
libraries/drivers/Image_Gd.php (modified) (2 diffs)
-
libraries/drivers/Payment_Authorize.php (modified) (3 diffs)
-
libraries/drivers/Payment_Paypal.php (modified) (8 diffs)
-
libraries/drivers/Session.php (modified) (1 diff)
-
libraries/drivers/Session_Cookie.php (modified) (2 diffs)
-
libraries/drivers/Session_Database.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/core/Kohana.php
r939 r1015 43 43 44 44 /* 45 * Method: __construct45 * Constructor: __construct 46 46 * Allows the controller to be a true singleton object. This method *must* 47 47 * be called by all controllers. -
trunk/system/helpers/form.php
r959 r1015 76 76 } 77 77 78 /** 79 * Hidden Input Field 80 * 81 * Generates hidden fields. You can pass a simple key/value string or an associative 82 * array with multiple values. 83 * 84 * @access public 85 * @param mixed 86 * @param string 87 * @return string 88 */ 89 /* 90 * Method: open 78 /* 79 * Method: hidden 91 80 * Generates hidden form fields. 81 * You can pass a simple key/value string or an associative array with multiple values. 92 82 * 93 83 * Parameters: -
trunk/system/libraries/Archive.php
r1001 r1015 17 17 18 18 /* 19 * Method: __construct19 * Constructor: __construct 20 20 * Loads the archive driver. 21 21 * -
trunk/system/libraries/Cache.php
r932 r1015 15 15 16 16 /* 17 * Method: __construct17 * Constructor: __construct 18 18 * Set up driver and get groups. 19 19 * -
trunk/system/libraries/Calendar.php
r932 r1015 20 20 21 21 /* 22 * Method: __construct22 * Constructor: __construct 23 23 * Sets the default time reference. 24 24 * -
trunk/system/libraries/Controller.php
r932 r1015 11 11 12 12 /* 13 * Method: __construct13 * Constructor: __construct 14 14 * Loads the Input, URI and Loader libraries into the '$this' namespace. 15 15 */ -
trunk/system/libraries/Database.php
r994 r1015 9 9 * copyright - (c) 2006 EllisLab, Inc. 10 10 * license - <http://www.codeigniter.com/user_guide/license.html> 11 *12 * $Id$13 11 */ 14 12 class Database_Core { … … 50 48 51 49 /* 52 * Method: __construct50 * Constructor: __construct 53 51 * Sets up the database configuration, loads the <Database_Driver>. 54 52 * … … 176 174 /* 177 175 * Method: connect 178 * Simple connect method to get the database queries up and running 176 * Simple connect method to get the database queries up and running. 179 177 */ 180 178 public function connect() … … 189 187 /* 190 188 * Method: query 191 * Runs a query into the driver and returns the result 192 * 193 * Parameters: 194 * sql - the sql line to run189 * Runs a query into the driver and returns the result. 190 * 191 * Parameters: 192 * sql - sql query to execute 195 193 * 196 194 * Returns: … … 236 234 /* 237 235 * Method: select 238 * Selects the column names for a database <Database.query> 239 * 240 * Parameters: 241 * sql - astring or array of column names to <Database.select>236 * Selects the column names for a database <Database.query>. 237 * 238 * Parameters: 239 * sql - string or array of column names to <Database.select> 242 240 * 243 241 * Returns: … … 271 269 /* 272 270 * Method: from 273 * Selects the from table(s) for a database <Database.query> 274 * 275 * Parameters: 276 * sql - astring or array of tables to <Database.select>271 * Selects the from table(s) for a database <Database.query>. 272 * 273 * Parameters: 274 * sql - string or array of tables to <Database.select> 277 275 * 278 276 * Returns: … … 291 289 } 292 290 293 /** 294 * Join 295 * 296 * Generates the JOIN portion of the query 297 * 298 * @access public 299 * @param string 300 * @param string the join condition 301 * @param string the type of join 302 * @return object 291 /* 292 * Method: join 293 * Generates the JOIN portion of the query. 294 * 295 * Parameters: 296 * table - table name 297 * cond - join condition 298 * type - type of join (optional) 299 * 300 * Returns: 301 * The <Database> object 303 302 */ 304 303 public function join($table, $cond, $type = '') … … 325 324 /* 326 325 * Method: where 327 * Selects the where(s) for a database <Database.query> 328 * 329 * Parameters: 330 * key - a key string or an array of key/value pairs to match331 * value - a value to match with thekey332 * quote - d on't know what this does...326 * Selects the where(s) for a database <Database.query>. 327 * 328 * Parameters: 329 * key - key name or array of key => value pairs 330 * value - value to match with key 331 * quote - disable quoting of WHERE clause 333 332 * 334 333 * Returns: … … 348 347 /* 349 348 * Method: orwhere 350 * Selects the or where(s) for a database <Database.query> 351 * 352 * Parameters: 353 * key - a key string or an array of key/value pairs to match354 * value - a value to match with thekey355 * quote - d on't know what this does...349 * Selects the or where(s) for a database <Database.query>. 350 * 351 * Parameters: 352 * key - key name or array of key => value pairs 353 * value - value to match with key 354 * quote - disable quoting of WHERE clause 356 355 * 357 356 * Returns: … … 371 370 /* 372 371 * Method: like 373 * Selects the like(s) for a database <Database.query> 374 * 375 * Parameters: 376 * field - a key string or an array of key/value pairs to match377 * match - a value to match with the key372 * Selects the like(s) for a database <Database.query>. 373 * 374 * Parameters: 375 * field - field name or array of field => match pairs 376 * match - like value to match with field 378 377 * 379 378 * Returns: … … 388 387 /* 389 388 * Method: orlike 390 * Selects the or like(s) for a database <Database.query> 391 * 392 * Parameters: 393 * field - a key string or an array of key/value pairs to match394 * match - a value to match with the key389 * Selects the or like(s) for a database <Database.query>. 390 * 391 * Parameters: 392 * field - field name or array of field => match pairs 393 * match - like value to match with field 395 394 * 396 395 * Returns: … … 405 404 /* 406 405 * Method: groupby 407 * chooses the column to group by in a select <Database.query> 408 * 409 * Parameters: 410 * by - acolumn name to group by406 * chooses the column to group by in a select <Database.query>. 407 * 408 * Parameters: 409 * by - column name to group by 411 410 * 412 411 * Returns: … … 435 434 /* 436 435 * Method: having 437 * Selects the having(s) for a database <Database.query> 438 * 439 * Parameters: 440 * key - a key string or an array of key/value pairs to match441 * value - a value to match with thekey436 * Selects the having(s) for a database <Database.query>. 437 * 438 * Parameters: 439 * key - key name or array of key => value pairs 440 * value - value to match with key 442 441 * 443 442 * Returns: … … 452 451 /* 453 452 * Method: orhaving 454 * Selects the or having(s) for a database <Database.query> 455 * 456 * Parameters: 457 * key - a key string or an array of key/value pairs to match458 * value - a value to match with thekey453 * Selects the or having(s) for a database <Database.query>. 454 * 455 * Parameters: 456 * key - key name or array of key => value pairs 457 * value - value to match with key 459 458 * 460 459 * Returns: … … 469 468 /* 470 469 * Method: orderby 471 * Chooses which column(s) to order the <Database.select> <Database.query> by 472 * 473 * Parameters: 474 * orderby - column(s) to order on475 * direction - thedirection of the order470 * Chooses which column(s) to order the <Database.select> <Database.query> by. 471 * 472 * Parameters: 473 * orderby - column(s) to order on 474 * direction - direction of the order 476 475 * 477 476 * Returns: … … 493 492 /* 494 493 * Method: limit 495 * Selects the limit section of a <Database.query> 496 * 497 * Parameters: 498 * value - the limit499 * offset - an offset to apply the limit to500 * 501 * Returns: 502 * The <Database> object 503 */ 504 public function limit($ value, $offset = FALSE)505 { 506 $this->limit = (int) $ value;494 * Selects the limit section of a <Database.query>. 495 * 496 * Parameters: 497 * value - number of rows to limit result to 498 * offset - offset in result to start returning rows from 499 * 500 * Returns: 501 * The <Database> object 502 */ 503 public function limit($limit, $offset = FALSE) 504 { 505 $this->limit = (int) $limit; 507 506 $this->offset = (int) $offset; 508 507 … … 512 511 /* 513 512 * Method: offset 514 * Sets the offset portion of a <Database.query> 515 * 516 * Parameters: 517 * value - theoffset value513 * Sets the offset portion of a <Database.query>. 514 * 515 * Parameters: 516 * value - offset value 518 517 * 519 518 * Returns: … … 528 527 /* 529 528 * Method: set 530 * Allows key/value pairs to be set for <Database.insert>ing or <Database.update>ing 531 * 532 * Parameters: 533 * key - a string or array of key/value pairs 529 * Allows key/value pairs to be set for <Database.insert>ing or <Database.update>ing. 530 * 531 * Parameters: 532 * key - key name or array of key => value pairs 533 * value - value to match with key 534 534 * 535 535 * Returns: … … 553 553 /* 554 554 * Method: get 555 * Compiles the <Database.select> statement based on the other functions called556 * and runs the query557 * 558 * Parameters: 559 * table - the table560 * limit - the<Database.limit> clause561 * offset - the<Database.offset> clause555 * Compiles the <Database.select> statement based on 556 * the other functions called and runs the query. 557 * 558 * Parameters: 559 * table - table name 560 * limit - <Database.limit> clause 561 * offset - <Database.offset> clause 562 562 * 563 563 * Returns: … … 588 588 /* 589 589 * Method: getwhere 590 * Compiles the <Database.select> statement based on the other functions called591 * and runs the <Database.query>592 * 593 * Parameters: 594 * table - the table595 * where - the<Database.where> clause596 * limit - the<Database.limit) clause597 * offset - the<Database.offset) clause590 * Compiles the <Database.select> statement based on 591 * the other functions called and runs the <Database.query>. 592 * 593 * Parameters: 594 * table - table name 595 * where - <Database.where> clause 596 * limit - <Database.limit) clause 597 * offset - <Database.offset) clause 598 598 * 599 599 * Returns: … … 626 626 /* 627 627 * Method: insert 628 * Compiles an insert string and runs the <Database.query> 629 * 630 * Parameters: 631 * table - t he table632 * set - anarray of key/value pairs to insert628 * Compiles an insert string and runs the <Database.query>. 629 * 630 * Parameters: 631 * table - table name 632 * set - array of key/value pairs to insert 633 633 * 634 634 * Returns: … … 670 670 671 671 /* 672 * Method: insert673 * Compiles an update string and runs the <Database.query> 674 * 675 * Parameters: 676 * table - t he table677 * set - anassociative array of update values678 * where - the whereclause672 * Method: update 673 * Compiles an update string and runs the <Database.query>. 674 * 675 * Parameters: 676 * table - table name 677 * set - associative array of update values 678 * where - <Database.where> clause 679 679 * 680 680 * Returns: … … 720 720 721 721 /* 722 * Method: insert 723 * Compiles a delete string and runs the <Database.query> 724 * 725 * Parameters: 726 * table - the table 727 * set - an associative array of update values 728 * where - the where clause 722 * Method: delete 723 * Compiles a delete string and runs the <Database.query>. 724 * 725 * Parameters: 726 * table - table name 727 * where - <Database.where> clause 729 728 * 730 729 * Returns: … … 767 766 /* 768 767 * Method: last_query 769 * returns the last <Database.query> run770 * 771 * Returns: 772 * A string containing the l est SQL statement768 * Returns the last <Database.query> run. 769 * 770 * Returns: 771 * A string containing the last SQL query 773 772 */ 774 773 public function last_query() … … 779 778 /* 780 779 * Method: count_records 781 * Count query records 782 * 783 * Parameters: 784 * table - t he table to count785 * where - an optional WHERE clause to count786 * 787 * Returns: 788 * A number containing the records in the query set780 * Count query records. 781 * 782 * Parameters: 783 * table - table name 784 * where - <Database.where> clause (optional) 785 * 786 * Returns: 787 * Number of records 789 788 */ 790 789 public function count_records($table = FALSE, $where = NULL) … … 811 810 /* 812 811 * Method: reset_select 813 * Resets all private select variables 812 * Resets all private select variables. 814 813 */ 815 814 private function reset_select() … … 830 829 /* 831 830 * Method: reset_write 832 * Resets all private insert and update variables 831 * Resets all private insert and update variables. 833 832 */ 834 833 private function reset_write() … … 841 840 /* 842 841 * Method: list_tables 843 * Lists all the tables in the current database 842 * Lists all the tables in the current database. 844 843 * 845 844 * Returns: … … 857 856 /* 858 857 * Method: table_exists 859 * See if a table exists in the database 860 * 861 * Parameters: 862 * table_name - t he name of the table to check863 * 864 * Returns: 865 * TRUE /FALSE858 * See if a table exists in the database. 859 * 860 * Parameters: 861 * table_name - table name 862 * 863 * Returns: 864 * TRUE or FALSE 866 865 */ 867 866 public function table_exists($table_name) … … 872 871 /* 873 872 * Method: compile_binds 874 * Combine a sql statement with the bind values. Used for safe queries !875 * 876 * Parameters: 877 * sql - thequery to bind to the values878 * binds - a n array of valueto bind to the query879 * 880 * Returns: 881 * string containing the final <Database.query> to run873 * Combine a sql statement with the bind values. Used for safe queries. 874 * 875 * Parameters: 876 * sql - query to bind to the values 877 * binds - array of values to bind to the query 878 * 879 * Returns: 880 * String containing the final <Database.query> to run 882 881 */ 883 882 public function compile_binds($sql, $binds) … … 904 903 /* 905 904 * Method: field_data 906 * Get the field data for a database table, along with the field's attributes 907 * 908 * Parameters: 909 * table - t he table to process910 * 911 * Returns: 912 * array containing the field data905 * Get the field data for a database table, along with the field's attributes. 906 * 907 * Parameters: 908 * table - table name 909 * 910
