Changeset 1710

Show
Ignore:
Timestamp:
01/13/08 20:12:01 (6 months ago)
Author:
PugFish
Message:

Updated helper file docblocks to new format, methods to come later
Quick attempt at fixing Form_Group to work with latest Forge changes, mostly untested

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/modules/forge/libraries/Form_Group.php

    r1594 r1710  
    1111        ); 
    1212 
     13        // Input method 
     14        public $method; 
     15 
    1316        public function __construct($class = 'group') 
    1417        { 
    1518                $this->data['class'] = $class; 
     19 
     20                // Set dummy data so we don't get errors 
     21                $this->attr['action'] = ''; 
     22                $this->attr['method'] = 'post'; 
    1623        } 
    1724 
     
    2330                } 
    2431                return parent::__get($key); 
     32        } 
     33 
     34        public function __set($key, $val) 
     35        { 
     36                if ($key == 'method') 
     37                { 
     38                        $this->attr['method'] = $val; 
     39                } 
     40                $this->$key = $val; 
    2541        } 
    2642 
  • trunk/system/helpers/arr.php

    r1694 r1710  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
    3  * Class: array_helper 
    4  *  Array helper class. 
     3 * Array helper class. 
    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 arr_Core { 
    12          
     13 
    1314        /** 
    14          * Method: rotate 
    15          *  Rotates a 2D array clockwise. 
    16          *  Example, turns a 2x3 array into a 3x2 array 
     15         * Rotates a 2D array clockwise. 
     16         * Example, turns a 2x3 array into a 3x2 array. 
    1717         * 
    18          * Parameters: 
    19          *  source_array - the array to rotate 
    20          *  keep_keys - keep the keys in the final rotated array. the sub arrays of the source array need to have the same key values. 
    21          *              if your subkeys might not match, you need to pass FALSE here! 
    22          * 
    23          * Returns: 
    24          *  The transformed array 
     18         * @param   array    array to rotate 
     19         * @param   boolean  keep the keys in the final rotated array. the sub arrays of the source array need to have the same key values. 
     20         *                   if your subkeys might not match, you need to pass FALSE here! 
     21         * @return  array 
    2522         */ 
    2623        public function rotate($source_array, $keep_keys = TRUE) 
     
    3532                        } 
    3633                } 
    37                  
     34 
    3835                return $new_array; 
    3936        } 
    40          
     37 
    4138        /** 
    42          * Method: remove 
    43          *  Removes a key from an array and returns the value 
     39         * Removes a key from an array and returns the value. 
    4440         * 
    45          * Parameters: 
    46          *  key - to key to return 
    47          *  array - the array to work on 
    48          * 
    49          * Returns: 
    50          *  The value of the requested array key 
     41         * @param   string  key to return 
     42         * @param   array   array to work on 
     43         * @return  mixed   value of the requested array key 
    5144         */ 
    5245        public function remove($key, & $array) 
     
    8174         * Binary search algorithm. 
    8275         * 
    83          * @param  mixed    the value to search for 
    84          * @param  array    an array of values to search in 
    85          * @param  boolean  return false, or the nearest value 
    86          * @param  mixed    sort the array before searching it 
    87          * @return integer 
     76         * @param  mixed    the value to search for 
     77         * @param  array    an array of values to search in 
     78         * @param  boolean  return false, or the nearest value 
     79         * @param  mixed    sort the array before searching it 
     80         * @return integer 
    8881         */ 
    8982        public function binary_search($needle, $haystack, $nearest = FALSE, $sort = FALSE) 
     
    124117                        return $high; 
    125118        } 
    126          
     119 
    127120        /** 
    128121         * Emulates array_merge_recursive, but appends numeric keys and replaces 
    129122         * associative keys, instead of appending all keys. 
    130123         * 
    131          * @param   array  any number of arrays 
     124         * @param   array  any number of arrays 
    132125         * @return  array 
    133126         */ 
  • trunk/system/helpers/cookie.php

    r1522 r1710  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
    3  * Class: cookie 
    4  *  Cookie helper class. 
     3 * Cookie helper class. 
    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 cookie_Core { 
  • trunk/system/helpers/date.php

    r1522 r1710  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
    3  * Class: date 
    4  *  Date helper class. 
     3 * Date helper class. 
    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 date_Core { 
  • trunk/system/helpers/download.php

    r1667 r1710  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
    3  * Class: download 
    4  *  Download helper class. 
     3 * Download helper class. 
    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    Download Helper 
     8 * @author     Kohana Team 
     9 * @copyright  (c) 2007-2008 Kohana Team 
     10 * @license    http://kohanaphp.com/license.html 
    1011 */ 
    1112class download_Core { 
  • trunk/system/helpers/feed.php

    r1654 r1710  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
    3  * Class: feed 
    4  *  Feed helper class. 
     3 * Feed helper class. 
    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    Feed Helper 
     8 * @author     Kohana Team 
     9 * @copyright  (c) 2007-2008 Kohana Team 
     10 * @license    http://kohanaphp.com/license.html 
    1011 */ 
    1112class feed_Core { 
  • trunk/system/helpers/file.php

    r1522 r1710  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
    3  * Class: file 
    4  *  File helper class. 
     3 * File helper class. 
    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    File Helper 
     8 * @author     Kohana Team 
     9 * @copyright  (c) 2007-2008 Kohana Team 
     10 * @license    http://kohanaphp.com/license.html 
    1011 */ 
    1112class file_Core { 
  • trunk/system/helpers/form.php

    r1622 r1710  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
    3  * Class: form 
    4  *  Form helper class. 
     3 * Form helper class. 
    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 form_Core { 
  • trunk/system/helpers/html.php

    r1689 r1710  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
    3  * Class: html 
    4  *  HTML helper class. 
     3 * HTML helper class. 
    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 html_Core { 
     
    202203         * Generate a "breadcrumb" list of anchors representing the URI. 
    203204         * 
    204          * @param  
     205         * @param 
    205206         * @return string 
    206207         */ 
     
    215216                        ( 
    216217                                // Complete URI for the URL 
    217                                 implode('/', $segments).'/'.$segment,  
     218                                implode('/', $segments).'/'.$segment, 
    218219                                // Title for the current segment 
    219220                                ucwords(inflector::humanize($segment)) 
     
    281282 
    282283                return $compiled; 
    283         }     
     284        } 
    284285 
    285286        /** 
  • trunk/system/helpers/inflector.php

    r1522 r1710  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
    3  * Class: inflector 
    4  *  Inflector helper class. 
     3 * Inflector helper class. 
    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 inflector_Core { 
  • trunk/system/helpers/num.php

    r1522 r1710  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    2  
     2/** 
     3 * Number helper class. 
     4 * 
     5 * $Id:$ 
     6 * 
     7 * @package    Number Helper 
     8 * @author     Kohana Team 
     9 * @copyright  (c) 2007-2008 Kohana Team 
     10 * @license    http://kohanaphp.com/license.html 
     11 */ 
    312class num_Core { 
    413 
     14        /** 
     15         * Round a number to the nearest nth 
     16         * 
     17         * @param   integer  number to round 
     18         * @param   integer  number to round to 
     19         * @return  integer 
     20         */ 
    521        public static function round($number, $nearest = 5) 
    622        { 
  • trunk/system/helpers/security.php

    r1522 r1710  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
    3  * Class: security 
    4  *  Security helper class. 
     3 * Security helper class. 
    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 security_Core { 
  • trunk/system/helpers/text.php

    r1547 r1710  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
    3  * Class: text 
    4  *  Text helper class. 
     3 * Text helper class. 
    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    Text Helper 
     8 * @author     Kohana Team 
     9 * @copyright  (c) 2007-2008 Kohana Team 
     10 * @license    http://kohanaphp.com/license.html 
    1011 */ 
    1112class text_Core { 
  • trunk/system/helpers/url.php

    r1690 r1710  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
    3  * Class: url 
    4  *  URL helper class. 
     3 * URL helper class. 
    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 url_Core { 
  • trunk/system/helpers/valid.php

    r1670 r1710  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
    3  * Class: valid 
    4  *  Validation helper class. 
     3 * Validation helper class. 
    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    Validation 
     8 * @author     Kohana Team 
     9 * @copyright  (c) 2007-2008 Kohana Team 
     10 * @license    http://kohanaphp.com/license.html 
    1011 */ 
    1112class valid_Core { 
     
    3031         *  Validate email, RFC compliant version 
    3132         *  Note: This function is LESS strict than valid_email. Choose carefully. 
    32          *  
     33         * 
    3334         *  Originally by Cal Henderson, modified to fit Kohana syntax standards: 
    3435         *  - http://www.iamcal.com/publish/articles/php/parsing_email/ 
     
    299300         * Returns: 
    300301         *  TRUE if string is a valid text, FALSE if not. 
    301          */     
     302         */ 
    302303        public static function standard_text($str) 
    303304        {