Changeset 1931 for trunk/system/libraries/drivers/Database/Mysqli.php
- Timestamp:
- 02/05/2008 04:56:30 PM (11 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/drivers/Database/Mysqli.php
r1906 r1931 1 1 <?php defined('SYSPATH') or die('No direct script access.'); 2 2 /** 3 * Class: Database_Mysqli_Driver 4 * Provides specific database items for MySQL. 3 * MySQLi Database Driver 5 4 * 6 * Kohana Source Code: 7 * author - Kohana Team 8 * copyright - (c) 2007 Kohana Team 9 * license - <http://kohanaphp.com/license.html> 5 * $Id$ 6 * 7 * @package Core 8 * @author Kohana Team 9 * @copyright (c) 2007-2008 Kohana Team 10 * @license http://kohanaphp.com/license.html 10 11 */ 11 12 class Database_Mysqli_Driver extends Database_Mysql_Driver { … … 17 18 18 19 /** 19 * Constructor: __construct 20 * Sets up the config for the class. 21 * 22 * Parameters: 23 * config - database configuration 20 * Sets the config for the class. 21 * 22 * @param array database configuration 24 23 */ 25 24 public function __construct($config) … … 127 126 128 127 /** 129 * Class: Mysqli_Result 130 * The result class for MySQLi queries. 131 * 132 * Kohana Source Code: 133 * author - Kohana Team 134 * copyright - (c) 2007 Kohana Team 135 * license - <http://kohanaphp.com/license.html> 128 * MySQLi result. 136 129 */ 137 130 class Kohana_Mysqli_Result implements Database_Result, ArrayAccess, Iterator, Countable { … … 153 146 154 147 /** 155 * Constructor: __construct 156 * Sets up the class. 157 * 158 * Parameters: 159 * result - result resource 160 * link - database resource link 161 * object - return objects or arrays 162 * sql - sql query that was run 148 * Sets up the result variables. 149 * 150 * @param object database link 151 * @param boolean return objects or arrays 152 * @param string SQL query that was run 163 153 */ 164 154 public function __construct($link, $object = TRUE, $sql) … … 200 190 201 191 /** 202 * Destructor: __destruct 203 * Magic __destruct function, frees the result. 192 * Magic __destruct function, frees the result. 204 193 */ 205 194 public function __destruct() … … 312 301 // Interface: Countable 313 302 /** 314 * Method: count 315 * Counts the number of rows in the result set. 316 * 317 * Returns: 318 * The number of rows in the result set 303 * Counts the number of rows in the result set. 304 * 305 * @return integer 319 306 */ 320 307 public function count() … … 326 313 // Interface: ArrayAccess 327 314 /** 328 * Method: offsetExists 329 * Determines if the requested offset of the result set exists. 330 * 331 * Parameters: 332 * offset - offset id 333 * 334 * Returns: 335 * TRUE if the offset exists, FALSE otherwise 315 * Determines if the requested offset of the result set exists. 316 * 317 * @param integer offset id 318 * @return boolean 336 319 */ 337 320 public function offsetExists($offset) … … 349 332 350 333 /** 351 * Method: offsetGet 352 * Retreives the requested query result offset. 353 * 354 * Parameters: 355 * offset - offset id 356 * 357 * Returns: 358 * The query row 334 * Retreives the requested query result offset. 335 * 336 * @param integer offset id 337 * @return mixed 359 338 */ 360 339 public function offsetGet($offset) … … 373 352 374 353 /** 375 * Method: offsetSet 376 * Sets the offset with the provided value. Since you can't modify query result sets, this function just throws an exception. 377 * 378 * Parameters: 379 * offset - offset id 380 * value - value to set 381 * 382 * Returns: 383 * <Kohana_Database_Exception> object 354 * Sets the offset with the provided value. Since you can't modify query result sets, this function just throws an exception. 355 * 356 * @param integer offset id 357 * @param integer value to set 358 * @throws Kohana_Database_Exception 384 359 */ 385 360 public function offsetSet($offset, $value) … … 389 364 390 365 /** 391 * Method: offsetUnset 392 * Unsets the offset. Since you can't modify query result sets, this function just throws an exception. 393 * 394 * Parameters: 395 * offset - offset id 396 * 397 * Returns: 398 * <Kohana_Database_Exception> object 366 * Unsets the offset. Since you can't modify query result sets, this function just throws an exception. 367 * 368 * @param integer offset id 369 * @throws Kohana_Database_Exception 399 370 */ 400 371 public function offsetUnset($offset) … … 406 377 // Interface: Iterator 407 378 /** 408 * Method: current 409 * Retreives the current result set row. 410 * 411 * Returns: 412 * The current result row (type based on <Mysql_result.result>) 379 * Retrieves the current result set row. 380 * 381 * @return mixed 413 382 */ 414 383 public function current() … … 418 387 419 388 /** 420 * Method: key 421 * Retreives the current row id. 422 * 423 * Returns: 424 * The current result row id 389 * Retreives the current row id. 390 * 391 * @return integer 425 392 */ 426 393 public function key() … … 430 397 431 398 /** 432 * Method: next 433 * Moves the result pointer ahead one. 434 * 435 * Returns: 436 * The next row id 399 * Moves the result pointer ahead one step. 400 * 401 * @return integer 437 402 */ 438 403 public function next() … … 442 407 443 408 /** 444 * Method: next 445 * Moves the result pointer back one. 446 * 447 * Returns: 448 * The previous row id 409 * Moves the result pointer back one step. 410 * 411 * @return integer 449 412 */ 450 413 public function prev() … … 454 417 455 418 /** 456 * Method: rewind 457 * Moves the result pointer to the beginning of the result set. 458 * 459 * Returns: 460 * 0 419 * Moves the result pointer to the beginning of the result set. 420 * 421 * @return integer 461 422 */ 462 423 public function rewind() … … 466 427 467 428 /** 468 * Method: valid 469 * Determines if the current result pointer is valid. 470 * 471 * Returns: 472 * TRUE if the pointer is valid, FALSE otherwise 429 * Determines if the current result pointer is valid. 430 * 431 * @return boolean 473 432 */ 474 433 public function valid() … … 480 439 } // End Mysqli_Result Class 481 440 441 /** 442 * MySQLi Prepared Statement (experimental) 443 */ 482 444 class Kohana_Mysqli_Statement { 483 445
