Show
Ignore:
Timestamp:
02/05/2008 04:56:30 PM (11 months ago)
Author:
PugFish
Message:

Converted database and payment drivers.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/drivers/Database/Mysqli.php

    r1906 r1931  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
    3  * Class: Database_Mysqli_Driver 
    4  *  Provides specific database items for MySQL. 
     3 * MySQLi Database Driver 
    54 * 
    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 
    1011 */ 
    1112class Database_Mysqli_Driver extends Database_Mysql_Driver { 
     
    1718 
    1819        /** 
    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 
    2423         */ 
    2524        public function __construct($config) 
     
    127126 
    128127/** 
    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. 
    136129 */ 
    137130class Kohana_Mysqli_Result implements Database_Result, ArrayAccess, Iterator, Countable { 
     
    153146 
    154147        /** 
    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 
    163153         */ 
    164154        public function __construct($link, $object = TRUE, $sql) 
     
    200190 
    201191        /** 
    202          * Destructor: __destruct 
    203          *  Magic __destruct function, frees the result. 
     192         * Magic __destruct function, frees the result. 
    204193         */ 
    205194        public function __destruct() 
     
    312301        // Interface: Countable 
    313302        /** 
    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 
    319306         */ 
    320307        public function count() 
     
    326313        // Interface: ArrayAccess 
    327314        /** 
    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 
    336319         */ 
    337320        public function offsetExists($offset) 
     
    349332 
    350333        /** 
    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 
    359338         */ 
    360339        public function offsetGet($offset) 
     
    373352 
    374353        /** 
    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 
    384359         */ 
    385360        public function offsetSet($offset, $value) 
     
    389364 
    390365        /** 
    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 
    399370         */ 
    400371        public function offsetUnset($offset) 
     
    406377        // Interface: Iterator 
    407378        /** 
    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 
    413382         */ 
    414383        public function current() 
     
    418387 
    419388        /** 
    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 
    425392         */ 
    426393        public function key() 
     
    430397 
    431398        /** 
    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 
    437402         */ 
    438403        public function next() 
     
    442407 
    443408        /** 
    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 
    449412         */ 
    450413        public function prev() 
     
    454417 
    455418        /** 
    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 
    461422         */ 
    462423        public function rewind() 
     
    466427 
    467428        /** 
    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 
    473432         */ 
    474433        public function valid() 
     
    480439} // End Mysqli_Result Class 
    481440 
     441/** 
     442 * MySQLi Prepared Statement (experimental) 
     443 */ 
    482444class Kohana_Mysqli_Statement { 
    483445