Ticket #662: kohana-docbook-cleanup.diff

File kohana-docbook-cleanup.diff, 10.6 kB (added by HarryR, 5 months ago)

Patch file from system/ against rev 2881

  • libraries/ORM.php

     
    1818        // Database field caching 
    1919        protected static $fields = array(); 
    2020 
    21         // Database instance 
     21        /** 
     22         * @var Database_Core 
     23         */ 
    2224        protected static $db; 
    2325 
    2426        // Automatic saving on model destruction 
  • libraries/Cache.php

     
    2626         * Returns a singleton instance of Cache. 
    2727         * 
    2828         * @param   array   configuration 
    29          * @return  object  Cache 
     29         * @return  Cache_Core 
    3030         */ 
    3131        public static function instance($config = array()) 
    3232        { 
  • libraries/Database.php

     
    5050         * Returns a singleton instance of Database. 
    5151         * 
    5252         * @param   mixed   configuration array or DSN 
    53          * @return  object 
     53         * @return  Database_Core 
    5454         */ 
    5555        public static function instance($config = array()) 
    5656        { 
     
    213213         * Runs a query into the driver and returns the result. 
    214214         * 
    215215         * @param   string  SQL query to execute 
    216          * @return  object  Database_Result 
     216         * @return  Database_Result 
    217217         */ 
    218218        public function query($sql = '') 
    219219        { 
     
    256256         * Selects the column names for a database query. 
    257257         * 
    258258         * @param   string  string or array of column names to select 
    259          * @return  object  This Database object. 
     259         * @return  Database_Core  This Database object. 
    260260         */ 
    261261        public function select($sql = '*') 
    262262        { 
     
    302302         * Selects the from table(s) for a database query. 
    303303         * 
    304304         * @param   string  string or array of tables to select 
    305          * @return  object  This Database object. 
     305         * @return  Database_Core  This Database object. 
    306306         */ 
    307307        public function from($sql) 
    308308        { 
     
    336336         * @param   string|array  where key or array of key => value pairs 
    337337         * @param   string        where value 
    338338         * @param   string        type of join 
    339          * @return  object        This Database object. 
     339         * @return  Database_Core        This Database object. 
    340340         */ 
    341341        public function join($table, $key, $value = NULL, $type = '') 
    342342        { 
     
    385385         * @param   string|array  key name or array of key => value pairs 
    386386         * @param   string        value to match with key 
    387387         * @param   boolean       disable quoting of WHERE clause 
    388          * @return  object        This Database object. 
     388         * @return  Database_Core        This Database object. 
    389389         */ 
    390390        public function where($key, $value = NULL, $quote = TRUE) 
    391391        { 
     
    407407         * @param   string|array  key name or array of key => value pairs 
    408408         * @param   string        value to match with key 
    409409         * @param   boolean       disable quoting of WHERE clause 
    410          * @return  object        This Database object. 
     410         * @return  Database_Core        This Database object. 
    411411         */ 
    412412        public function orwhere($key, $value = NULL, $quote = TRUE) 
    413413        { 
     
    429429         * @param   string|array  field name or array of field => match pairs 
    430430         * @param   string        like value to match with field 
    431431         * @param   boolean       automatically add starting and ending wildcards 
    432          * @return  object        This Database object. 
     432         * @return  Database_Core        This Database object. 
    433433         */ 
    434434        public function like($field, $match = '', $auto = TRUE) 
    435435        { 
     
    450450         * @param   string|array  field name or array of field => match pairs 
    451451         * @param   string        like value to match with field 
    452452         * @param   boolean       automatically add starting and ending wildcards 
    453          * @return  object        This Database object. 
     453         * @return  Database_Core        This Database object. 
    454454         */ 
    455455        public function orlike($field, $match = '', $auto = TRUE) 
    456456        { 
     
    471471         * @param   string|array  field name or array of field => match pairs 
    472472         * @param   string        like value to match with field 
    473473         * @param   boolean       automatically add starting and ending wildcards 
    474          * @return  object        This Database object. 
     474         * @return  Database_Core        This Database object. 
    475475         */ 
    476476        public function notlike($field, $match = '', $auto = TRUE) 
    477477        { 
     
    491491         * 
    492492         * @param   string|array  field name or array of field => match pairs 
    493493         * @param   string        like value to match with field 
    494          * @return  object        This Database object. 
     494         * @return  Database_Core        This Database object. 
    495495         */ 
    496496        public function ornotlike($field, $match = '', $auto = TRUE) 
    497497        { 
     
    511511         * 
    512512         * @param   string|array  field name or array of field => match pairs 
    513513         * @param   string        like value to match with field 
    514          * @return  object        This Database object. 
     514         * @return  Database_Core        This Database object. 
    515515         */ 
    516516        public function regex($field, $match = '') 
    517517        { 
     
    531531         * 
    532532         * @param   string|array  field name or array of field => match pairs 
    533533         * @param   string        like value to match with field 
    534          * @return  object        This Database object. 
     534         * @return  Database_Core        This Database object. 
    535535         */ 
    536536        public function orregex($field, $match = '') 
    537537        { 
     
    551551         * 
    552552         * @param   string|array  field name or array of field => match pairs 
    553553         * @param   string        regex value to match with field 
    554          * @return  object        This Database object. 
     554         * @return  Database_Core        This Database object. 
    555555         */ 
    556556        public function notregex($field, $match = '') 
    557557        { 
     
    571571         * 
    572572         * @param   string|array  field name or array of field => match pairs 
    573573         * @param   string        regex value to match with field 
    574          * @return  object        This Database object. 
     574         * @return  Database_Core        This Database object. 
    575575         */ 
    576576        public function ornotregex($field, $match = '') 
    577577        { 
     
    590590         * Chooses the column to group by in a select query. 
    591591         * 
    592592         * @param   string  column name to group by 
    593          * @return  object  This Database object. 
     593         * @return  Database_Core  This Database object. 
    594594         */ 
    595595        public function groupby($by) 
    596596        { 
     
    618618         * @param   string|array  key name or array of key => value pairs 
    619619         * @param   string        value to match with key 
    620620         * @param   boolean       disable quoting of WHERE clause 
    621          * @return  object        This Database object. 
     621         * @return  Database_Core        This Database object. 
    622622         */ 
    623623        public function having($key, $value = '', $quote = TRUE) 
    624624        { 
     
    632632         * @param   string|array  key name or array of key => value pairs 
    633633         * @param   string        value to match with key 
    634634         * @param   boolean       disable quoting of WHERE clause 
    635          * @return  object        This Database object. 
     635         * @return  Database_Core        This Database object. 
    636636         */ 
    637637        public function orhaving($key, $value = '', $quote = TRUE) 
    638638        { 
     
    645645         * 
    646646         * @param   string|array  column(s) to order on, can be an array, single column, or comma seperated list of columns 
    647647         * @param   string        direction of the order 
    648          * @return  object        This Database object. 
     648         * @return  Database_Core        This Database object. 
    649649         */ 
    650650        public function orderby($orderby, $direction = '') 
    651651        { 
     
    686686         * 
    687687         * @param   integer  number of rows to limit result to 
    688688         * @param   integer  offset in result to start returning rows from 
    689          * @return  object   This Database object. 
     689         * @return  Database_Core   This Database object. 
    690690         */ 
    691691        public function limit($limit, $offset = FALSE) 
    692692        { 
     
    700700         * Sets the offset portion of a query. 
    701701         * 
    702702         * @param   integer  offset value 
    703          * @return  object   This Database object. 
     703         * @return  Database_Core   This Database object. 
    704704         */ 
    705705        public function offset($value) 
    706706        { 
     
    714714         * 
    715715         * @param   string|array  key name or array of key => value pairs 
    716716         * @param   string        value to match with key 
    717          * @return  object        This Database object. 
     717         * @return  Database_Core        This Database object. 
    718718         */ 
    719719        public function set($key, $value = '') 
    720720        { 
     
    737737         * @param   string  table name 
    738738         * @param   string  limit clause 
    739739         * @param   string  offset clause 
    740          * @return  object  Database_Result 
     740         * @return  Database_Result 
    741741         */ 
    742742        public function get($table = '', $limit = NULL, $offset = NULL) 
    743743        { 
     
    768768         * @param   array   where clause 
    769769         * @param   string  limit clause 
    770770         * @param   string  offset clause 
    771          * @return  object  This Database object. 
     771         * @return  Database_Core  This Database object. 
    772772         */ 
    773773        public function getwhere($table = '', $where = NULL, $limit = NULL, $offset = NULL) 
    774774        { 
     
    826826         * 
    827827         * @param   string  table name 
    828828         * @param   array   array of key/value pairs to insert 
    829          * @return  object  This Database object. 
     829         * @return  Database_Result  Query result 
    830830         */ 
    831831        public function insert($table = '', $set = NULL) 
    832832        { 
     
    861861         * @param   string  Name of the column being examined 
    862862         * @param   mixed   An array or string to match against 
    863863         * @param   bool    Generate a NOT IN clause instead 
    864          * @return  object  This Database object. 
     864         * @return  Database_Core  This Database object. 
    865865         */ 
    866866        public function in($field, $values, $not = FALSE)  
    867867        { 
     
    891891         *  
    892892         * @param   string  Name of the column being examined 
    893893         * @param   mixed   An array or string to match against 
    894          * @return  object  This Database object. 
     894         * @return  Database_Core  This Database object. 
    895895         */ 
    896896        public function notin($field, $values)  
    897897        { 
     
    903903         * 
    904904         * @param   string  table name 
    905905         * @param   array   array of key/value pairs to merge 
    906          * @return  object  This Database object. 
     906         * @return  Database_Result  Query result 
    907907         */ 
    908908        public function merge($table = '', $set = NULL) 
    909909        { 
     
    935935         * @param   string  table name 
    936936         * @param   array   associative array of update values 
    937937         * @param   array   where clause 
    938          * @return  object  This Database object. 
     938         * @return  Database_Result  Query result 
    939939         */ 
    940940        public function update($table = '', $set = NULL, $where = NULL) 
    941941        { 
     
    971971         * 
    972972         * @param   string  table name 
    973973         * @param   array   where clause 
    974          * @return  object  This Database object. 
     974         * @return  Database_Result  Query result 
    975975         */ 
    976976        public function delete($table = '', $where = NULL) 
    977977        { 
     
    10001000        /** 
    10011001         * Returns the last query run. 
    10021002         * 
    1003          * @return  string 
     1003         * @return  string SQL 
    10041004         */ 
    10051005        public function last_query() 
    10061006        { 
     
    12031203         * Clears the query cache. 
    12041204         * 
    12051205         * @param   string|TRUE  clear cache by SQL statement or TRUE for last query 
    1206          * @return  object       This Database object. 
     1206         * @return  Database_Core       This Database object. 
    12071207         */ 
    12081208        public function clear_cache($sql = NULL) 
    12091209        {