Changeset 931

Show
Ignore:
Timestamp:
10/31/2007 11:49:47 PM (13 months ago)
Author:
PugFish
Message:

More converted

Location:
trunk/system/libraries
Files:
14 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/Cache.php

    r929 r931  
    1414        protected $driver; 
    1515 
     16        /* 
     17         * Method: __construct 
     18         *  Set up driver and get groups 
     19         * 
     20         * Parameters: 
     21         *  config - custom configuration 
     22         */ 
    1623        function __construct($config = array()) 
    1724        { 
     
    2128        } 
    2229 
     30        /* 
     31         * Method: get 
     32         *  Get data from cache 
     33         * 
     34         * Parameters: 
     35         *  name - name of cache entry 
     36         * 
     37         * Returns: 
     38         *   Cached data 
     39         */ 
    2340        function get($name) 
    2441        { 
     
    2643        } 
    2744 
     45        /* 
     46         * Method: set 
     47         *  Save data into cache 
     48         * 
     49         * Parameters: 
     50         *  name - name of cache entry 
     51         *  item - data to save 
     52         * 
     53         * Returns: 
     54         *   TRUE or FALSE 
     55         */ 
    2856        function set($name, $item) 
    2957        { 
     
    3159        } 
    3260 
     61        /* 
     62         * Method: del 
     63         *  Delete cache entry 
     64         * 
     65         * Parameters: 
     66         *  name - name of cache entry 
     67         * 
     68         * Returns: 
     69         *   TRUE or FALSE 
     70         */ 
    3371        function del($name) 
    3472        { 
  • trunk/system/libraries/Encrypt.php

    r929 r931  
    7979         * 
    8080         * Returns: 
    81          *  The encoded string. 
     81         *  The encoded string 
    8282         */ 
    8383        public function encode($string, $key = '') 
     
    103103         * 
    104104         * Returns: 
    105          *  The decoded data. 
     105         *  The decoded data 
    106106         */ 
    107107        public function decode($string, $key = '') 
     
    130130         * 
    131131         * Returns: 
    132          *  The encoded string. 
     132         *  The encoded string 
    133133         */ 
    134134        protected function xor_encode($string, $key) 
     
    161161         * 
    162162         * Returns: 
    163          *  The decoded data. 
     163         *  The decoded data 
    164164         */ 
    165165        protected function xor_decode($string, $key) 
     
    185185         * 
    186186         * Returns: 
    187          *  The combined string and key. 
     187         *  The combined string and key 
    188188         */ 
    189189        protected function xor_merge($string, $key) 
     
    209209         * 
    210210         * Returns: 
    211          *  The encoded string. 
     211         *  The encoded string 
    212212         */ 
    213213        public function mcrypt_encode($data, $key) 
     
    228228         * 
    229229         * Returns: 
    230          *  The decoded data. 
     230         *  The decoded data 
    231231         */ 
    232232        public function mcrypt_decode($data, $key) 
  • trunk/system/libraries/Ftp.php

    r929 r931  
    6161         * 
    6262         * Returns: 
    63          *  TRUE or FALSE. 
     63         *  TRUE or FALSE 
    6464         */ 
    6565        public function connect($config = array()) 
     
    102102         * 
    103103         * Returns: 
    104          *  TRUE or FALSE. 
     104         *  TRUE or FALSE 
    105105         */ 
    106106        private function login() 
     
    114114         * 
    115115         * Returns: 
    116          *  TRUE or FALSE. 
     116         *  TRUE or FALSE 
    117117         */ 
    118118        private function is_conn() 
     
    143143         * 
    144144         * Returns: 
    145          *  TRUE or FALSE. 
     145         *  TRUE or FALSE 
    146146         */ 
    147147        public function changedir($path = '', $supress_debug = FALSE) 
     
    175175         * 
    176176         * Returns: 
    177          *  TRUE or FALSE. 
     177         *  TRUE or FALSE 
    178178         */ 
    179179        public function mkdir($path = '', $permissions = NULL) 
     
    213213         * 
    214214         * Returns: 
    215          *  TRUE or FALSE. 
     215         *  TRUE or FALSE 
    216216         */ 
    217217        public function upload($locpath, $rempath, $mode = 'auto', $permissions = NULL) 
     
    266266         * 
    267267         * Returns: 
    268          *  TRUE or FALSE. 
     268         *  TRUE or FALSE 
    269269         */ 
    270270        public function rename($old_file, $new_file, $move = FALSE) 
     
    298298         * 
    299299         * Returns: 
    300          *  TRUE or FALSE. 
     300         *  TRUE or FALSE 
    301301         */ 
    302302        public function move($old_file, $new_file) 
     
    313313         * 
    314314         * Returns: 
    315          *  TRUE or FALSE. 
     315         *  TRUE or FALSE 
    316316         */ 
    317317        public function delete_file($filepath) 
     
    336336        /* 
    337337         * Method: delete_dir 
    338          *  Delete a folder and recursively delete everything (including sub-folders) contained within it. 
     338         *  Delete a folder and recursively delete everything (including sub-folders) contained within it 
    339339         * 
    340340         * Parameters: 
     
    342342         * 
    343343         * Returns: 
    344          *  TRUE or FALSE. 
     344         *  TRUE or FALSE 
    345345         */ 
    346346        public function delete_dir($filepath) 
     
    390390         * 
    391391         * Returns: 
    392          *  TRUE or FALSE. 
     392         *  TRUE or FALSE 
    393393         */ 
    394394        public function chmod($path, $perm) 
     
    447447         *  This function recursively reads a folder and everything it contains (including 
    448448         *  sub-folders) and creates a mirror via FTP based on it.  Whatever the directory structure 
    449          *  of the original file path will be recreated on the server. 
     449         *  of the original file path will be recreated on the server 
    450450         * 
    451451         * Parameters: 
     
    454454         * 
    455455         * Returns: 
    456          *  TRUE or FALSE. 
     456         *  TRUE or FALSE 
    457457         */ 
    458458        public function mirror($locpath, $rempath) 
     
    502502         * 
    503503         * Returns: 
    504          *  Extracted file extension. 
     504         *  Extracted file extension 
    505505         */ 
    506506        private function get_extension($filename) 
     
    552552         * 
    553553         * Returns: 
    554          *  TRUE or FALSE. 
     554         *  TRUE or FALSE 
    555555         */ 
    556556        public function close() 
     
    562562        } 
    563563 
    564         /** 
    565          * Display error message 
    566          * 
    567          * @access      private 
    568          * @param       string 
    569          * @return      boolean 
    570          */ 
    571564        /* 
    572565         * Method: error 
  • trunk/system/libraries/Image_lib.php

    r816 r931  
    146146                 * properties using ImageMagick and NetPBM 
    147147                 * 
    148                  * Note: GD is not required for this function 
     148                 * Note - GD is not required for this function 
    149149                 * 
    150150                 */ 
  • trunk/system/libraries/Input.php

    r915 r931  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    2 /** 
    3  * Kohana: The swift, small, and secure PHP5 framework 
     2/* 
     3 * Class: Input 
    44 * 
    5  * @package    Kohana 
    6  * @author     Kohana Team 
    7  * @copyright  Copyright (c) 2007 Kohana Team 
    8  * @link       http://kohanaphp.com 
    9  * @license    http://kohanaphp.com/license.html 
    10  * @since      Version 2.0 
    11  * @filesource 
    12  * $Id$ 
    13  */ 
    14  
    15 /** 
    16  * Input Class 
    17  * 
    18  * @category    Libraries 
    19  * @author      Rick Ellis, Kohana Team 
    20  * @copyright   Copyright (c) 2006, EllisLab, Inc. 
    21  * @license     http://www.codeigniter.com/user_guide/license.html 
    22  * @link        http://kohanaphp.com/user_guide/en/libraries/input.html 
     5 * Kohana Source Code: 
     6 *  author    - Rick Ellis, Kohana Team 
     7 *  copyright - Copyright (c) 2006, EllisLab, Inc. 
     8 *  license   - <http://www.codeigniter.com/user_guide/license.html> 
    239 */ 
    2410class Input_Core { 
     
    3117        public $user_agent = FALSE; 
    3218 
    33         /** 
    34          * Constructor 
    35          * 
    36          * Sets whether to globally enable the XSS processing 
    37          * and whether to allow the $_GET array 
    38          * 
    39          * @access  public 
    40          * @return  void 
     19        /* 
     20         * Method: __construct 
     21         *  Sets whether to globally enable the XSS processing and whether to allow the $_GET array 
    4122         */ 
    4223        public function __construct() 
     
    11394        } 
    11495 
    115         /** 
    116          * Fetch an item from a global array 
    117          * 
    118          * @access  protected 
    119          * @param   string 
    120          * @param   array 
    121          * @return  string 
     96        /* 
     97         * Method: __call 
     98         *  Fetch an item from a global array 
     99         * 
     100         * Parameters: 
     101         *  global - array to access (get, post, cookie or server) 
     102         *  args   - arguments (array key, xss_clean) 
     103         * 
     104         * Returns: 
     105         *  Value of array item 
    122106         */ 
    123107        public function __call($global, $args = array()) 
     
    167151        } 
    168152 
    169         /** 
    170          * Clean Input Data 
    171          * 
    172          * This is a helper function. It escapes data and 
    173          * standardizes newline characters to \n 
    174          * 
    175          * @access  protected 
    176          * @param   string 
    177          * @return string 
     153        /* 
     154         * Method: clean_input_data 
     155         *  This is a helper function. It escapes data and standardizes newline characters to \n 
     156         * 
     157         * Parameters: 
     158         *  str - string to clean 
     159         * 
     160         * Returns: 
     161         *  Cleaned string 
    178162         */ 
    179163        protected function clean_input_data($str) 
     
    203187        } 
    204188 
    205         /** 
    206          * Clean Keys 
    207          * 
    208          * This is a helper function. To prevent malicious users 
    209          * from trying to exploit keys we make sure that keys are 
    210          * only named with alpha-numeric text and a few other items. 
    211          * 
    212          * @access  protected 
    213          * @param   string 
    214          * @return  string 
     189        /* 
     190         * Method: clean_input_keys 
     191         *  This is a helper function. To prevent malicious users 
     192         *  from trying to exploit keys we make sure that keys are 
     193         *  only named with alpha-numeric text and a few other items. 
     194         * 
     195         * Parameters: 
     196         *  str - string to clean 
     197         * 
     198         * Returns: 
     199         *  Cleaned string 
    215200         */ 
    216201        protected function clean_input_keys($str) 
     
    224209        } 
    225210 
    226         /** 
    227          * Fetch the IP Address 
    228          * 
    229          * @access  public 
    230          * @return  string 
     211        /* 
     212         * Method: ip_address 
     213         *  Fetch the IP Address 
     214         * 
     215         * Returns: 
     216         *  IP address 
    231217         */ 
    232218        public function ip_address() 
     
    272258        } 
    273259 
    274         /** 
    275          * Validate IP Address 
    276          * 
    277          * Validates an IPv4 address based on RFC specifications 
    278          * 
    279          * @access  public 
    280          * @param   string 
    281          * @return  boolean 
     260        /* 
     261         * Method: valid_ip 
     262         *  Validates an IPv4 address based on RFC specifications 
     263         * 
     264         * Parameters: 
     265         *  ip - IP to validate 
     266         * 
     267         * Returns: 
     268         *  TRUE or FALSE 
    282269         */ 
    283270        public function valid_ip($ip) 
     
    286273        } 
    287274 
    288         /** 
    289          * User Agent 
    290          * 
    291          * @access  public 
    292          * @return  string 
     275        /* 
     276         * Method: user_agent 
     277         *  Get the user agent of the current request 
     278         * 
     279         * Returns: 
     280         *  The user agent 
    293281         */ 
    294282        public function user_agent() 
     
    302290        } 
    303291 
    304         /** 
    305          * XSS Clean implemented by HTML Purifier 
    306          * 
    307          * Note: This function should only be used to deal with data upon submission. 
    308          * It's not something that should be used for general runtime processing 
    309          * since it requires a fair amount of processing overhead. 
    310          * 
    311          * @access  public 
    312          * @param   string 
    313          * @param   string 
    314          * @return  string 
     292        /* 
     293         * Method: xss_clean 
     294         *  Clean cross site scripting exploits from string. 
     295         *  HTMLPurifier may be used if installed, otherwise defaults to built in method. 
     296         *  Note - This function should only be used to deal with data upon submission. 
     297         *  It's not something that should be used for general runtime processing 
     298         *  since it requires a fair amount of processing overhead. 
     299         * 
     300         * Parameters: 
     301         *  string - string to clean 
     302         *  tool   - xss_clean method to use ('htmlpurifier' or defaults to built in method) 
     303         * 
     304         * Returns: 
     305         *  Cleaned string 
    315306         */ 
    316307        public function xss_clean($string, $tool = '') 
  • trunk/system/libraries/Loader.php

    r828 r931  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    2 /** 
    3  * Kohana: The swift, small, and secure PHP5 framework 
     2/* 
     3 * Class: Loader 
    44 * 
    5  * @package    Kohana 
    6  * @author     Kohana Team 
    7  * @copyright  Copyright (c) 2007 Kohana Team 
    8  * @link       http://kohanaphp.com 
    9  * @license    http://kohanaphp.com/license.html 
    10  * @since      Version 2.0 
    11  * @filesource 
    12  * $Id$ 
    13  */ 
    14  
    15 /** 
    16  * Loader Class 
    17  * 
    18  * @category    Libraries 
    19  * @author      Kohana Team 
    20  * @link        http://kohanaphp.com/user_guide/en/libraries/loader.html 
     5 * Kohana Source Code: 
     6 *  author    - Kohana Team 
     7 *  copyright - (c) 2007 Kohana Team 
     8 *  license   - <http://kohanaphp.com/license.html> 
    219 */ 
    2210class Loader_Core { 
    2311 
    24         /** 
    25          * Constructor 
     12        /* 
     13         * Method: __construct 
     14         *  Autoloads libraries and models specified in config file 
    2615         */ 
    2716        public function __construct() 
     
    5544        } 
    5645 
    57         /** 
    58          * Library 
     46        /* 
     47         * Method: library 
     48         *  Load library 
    5949         * 
    60          * @access public 
    61          * @param  string 
    62          * @param  array 
    63          * @param  boolean 
    64          * @return mixed 
     50         * Parameters: 
     51         *  name   - library name 
     52         *  config - custom configuration 
     53         *  return - return library instance instead of adding to Kohana instance 
     54         * 
     55         * Returns: 
     56         *  FALSE  - library is already loaded 
     57         *  Object - instance of library if 'return' parameter is TRUE 
    6558         */ 
    6659        public function library($name, $config = array(), $return = FALSE) 
     
    8578        } 
    8679 
    87         /** 
    88          * Database 
     80        /* 
     81         * Method: database 
     82         *  Load database 
    8983         * 
    90          * @access public 
    91          * @param  string 
    92          * @param  boolean 
    93          * @return mixed 
     84         * Parameters: 
     85         *  group  - Database config group to use 
     86         *  return - return database instance instead of adding to Kohana instance 
     87         * 
     88         * Returns: 
     89         *  Database instance if 'return' parameter is TRUE 
    9490         */ 
    9591        public function database($group = 'default', $return = FALSE) 
     
    104100        } 
    105101 
    106         /** 
    107          * Helper 
     102        /* 
     103         * Method: helper 
     104         *  Load helper 
    108105         * 
    109          * @access public 
    110          * @param  string 
    111          * @return void 
     106         * Parameters: 
     107         *  name - helper name 
    112108         */ 
    113109        public function helper($name) 
     
    129125        } 
    130126 
    131         /** 
    132          * Model 
     127        /* 
     128         * Method: model 
     129         *  Load model 
    133130         * 
    134          * @access public 
    135          * @param  string 
    136          * @param  mixed 
    137          * @return mixed 
     131         * Parameters: 
     132         *  name  - model name 
     133         *  alias - custom name for accessing model, or TRUE to return instance of model 
     134         * 
     135         * Returns: 
     136         *  FALSE  - model is already loaded 
     137         *  Object - instance of model if 'alias' parameter is TRUE 
    138138         */ 
    139139        public function model($name, $alias = FALSE) 
     
    164164        } 
    165165 
    166         /** 
    167          * View 
     166        /* 
     167         * Method: view 
     168         *  Load view 
    168169         * 
    169          * @access public 
    170          * @param  string 
    171          * @param  array 
    172          * @return object 
     170         * Parameters: 
     171         *  name - view name 
     172         *  data - data to make accessible within view 
     173         * 
     174         * Returns: 
     175         *  Instance of specified view 
    173176         */ 
    174177        public function view($name, $data = array()) 
  • trunk/system/libraries/Model.php

    r816 r931  
    11<?php defined('SYSPATH') or die('No direct script access.');