Changeset 1710
- Timestamp:
- 01/13/08 20:12:01 (6 months ago)
- Files:
-
- trunk/modules/forge/libraries/Form_Group.php (modified) (2 diffs)
- trunk/system/helpers/arr.php (modified) (4 diffs)
- trunk/system/helpers/cookie.php (modified) (1 diff)
- trunk/system/helpers/date.php (modified) (1 diff)
- trunk/system/helpers/download.php (modified) (1 diff)
- trunk/system/helpers/feed.php (modified) (1 diff)
- trunk/system/helpers/file.php (modified) (1 diff)
- trunk/system/helpers/form.php (modified) (1 diff)
- trunk/system/helpers/html.php (modified) (4 diffs)
- trunk/system/helpers/inflector.php (modified) (1 diff)
- trunk/system/helpers/num.php (modified) (1 diff)
- trunk/system/helpers/security.php (modified) (1 diff)
- trunk/system/helpers/text.php (modified) (1 diff)
- trunk/system/helpers/url.php (modified) (1 diff)
- trunk/system/helpers/valid.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/modules/forge/libraries/Form_Group.php
r1594 r1710 11 11 ); 12 12 13 // Input method 14 public $method; 15 13 16 public function __construct($class = 'group') 14 17 { 15 18 $this->data['class'] = $class; 19 20 // Set dummy data so we don't get errors 21 $this->attr['action'] = ''; 22 $this->attr['method'] = 'post'; 16 23 } 17 24 … … 23 30 } 24 31 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; 25 41 } 26 42 trunk/system/helpers/arr.php
r1694 r1710 1 1 <?php defined('SYSPATH') or die('No direct script access.'); 2 2 /** 3 * Class: array_helper 4 * Array helper class. 3 * Array helper class. 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 arr_Core { 12 13 13 14 /** 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. 17 17 * 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 25 22 */ 26 23 public function rotate($source_array, $keep_keys = TRUE) … … 35 32 } 36 33 } 37 34 38 35 return $new_array; 39 36 } 40 37 41 38 /** 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. 44 40 * 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 51 44 */ 52 45 public function remove($key, & $array) … … 81 74 * Binary search algorithm. 82 75 * 83 * @param mixed the value to search for84 * @param array an array of values to search in85 * @param boolean return false, or the nearest value86 * @param mixed sort the array before searching it87 * @return integer76 * @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 88 81 */ 89 82 public function binary_search($needle, $haystack, $nearest = FALSE, $sort = FALSE) … … 124 117 return $high; 125 118 } 126 119 127 120 /** 128 121 * Emulates array_merge_recursive, but appends numeric keys and replaces 129 122 * associative keys, instead of appending all keys. 130 123 * 131 * @param array any number of arrays124 * @param array any number of arrays 132 125 * @return array 133 126 */ trunk/system/helpers/cookie.php
r1522 r1710 1 1 <?php defined('SYSPATH') or die('No direct script access.'); 2 2 /** 3 * Class: cookie 4 * Cookie helper class. 3 * Cookie helper class. 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 cookie_Core { trunk/system/helpers/date.php
r1522 r1710 1 1 <?php defined('SYSPATH') or die('No direct script access.'); 2 2 /** 3 * Class: date 4 * Date helper class. 3 * Date helper class. 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 date_Core { trunk/system/helpers/download.php
r1667 r1710 1 1 <?php defined('SYSPATH') or die('No direct script access.'); 2 2 /** 3 * Class: download 4 * Download helper class. 3 * Download helper class. 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 Download Helper 8 * @author Kohana Team 9 * @copyright (c) 2007-2008 Kohana Team 10 * @license http://kohanaphp.com/license.html 10 11 */ 11 12 class download_Core { trunk/system/helpers/feed.php
r1654 r1710 1 1 <?php defined('SYSPATH') or die('No direct script access.'); 2 2 /** 3 * Class: feed 4 * Feed helper class. 3 * Feed helper class. 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 Feed Helper 8 * @author Kohana Team 9 * @copyright (c) 2007-2008 Kohana Team 10 * @license http://kohanaphp.com/license.html 10 11 */ 11 12 class feed_Core { trunk/system/helpers/file.php
r1522 r1710 1 1 <?php defined('SYSPATH') or die('No direct script access.'); 2 2 /** 3 * Class: file 4 * File helper class. 3 * File helper class. 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 File Helper 8 * @author Kohana Team 9 * @copyright (c) 2007-2008 Kohana Team 10 * @license http://kohanaphp.com/license.html 10 11 */ 11 12 class file_Core { trunk/system/helpers/form.php
r1622 r1710 1 1 <?php defined('SYSPATH') or die('No direct script access.'); 2 2 /** 3 * Class: form 4 * Form helper class. 3 * Form helper class. 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 form_Core { trunk/system/helpers/html.php
r1689 r1710 1 1 <?php defined('SYSPATH') or die('No direct script access.'); 2 2 /** 3 * Class: html 4 * HTML helper class. 3 * HTML helper class. 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 html_Core { … … 202 203 * Generate a "breadcrumb" list of anchors representing the URI. 203 204 * 204 * @param 205 * @param 205 206 * @return string 206 207 */ … … 215 216 ( 216 217 // Complete URI for the URL 217 implode('/', $segments).'/'.$segment, 218 implode('/', $segments).'/'.$segment, 218 219 // Title for the current segment 219 220 ucwords(inflector::humanize($segment)) … … 281 282 282 283 return $compiled; 283 } 284 } 284 285 285 286 /** trunk/system/helpers/inflector.php
r1522 r1710 1 1 <?php defined('SYSPATH') or die('No direct script access.'); 2 2 /** 3 * Class: inflector 4 * Inflector helper class. 3 * Inflector helper class. 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 inflector_Core { trunk/system/helpers/num.php
r1522 r1710 1 1 <?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 */ 3 12 class num_Core { 4 13 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 */ 5 21 public static function round($number, $nearest = 5) 6 22 { trunk/system/helpers/security.php
r1522 r1710 1 1 <?php defined('SYSPATH') or die('No direct script access.'); 2 2 /** 3 * Class: security 4 * Security helper class. 3 * Security helper class. 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 security_Core { trunk/system/helpers/text.php
r1547 r1710 1 1 <?php defined('SYSPATH') or die('No direct script access.'); 2 2 /** 3 * Class: text 4 * Text helper class. 3 * Text helper class. 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 Text Helper 8 * @author Kohana Team 9 * @copyright (c) 2007-2008 Kohana Team 10 * @license http://kohanaphp.com/license.html 10 11 */ 11 12 class text_Core { trunk/system/helpers/url.php
r1690 r1710 1 1 <?php defined('SYSPATH') or die('No direct script access.'); 2 2 /** 3 * Class: url 4 * URL helper class. 3 * URL helper class. 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 url_Core { trunk/system/helpers/valid.php
r1670 r1710 1 1 <?php defined('SYSPATH') or die('No direct script access.'); 2 2 /** 3 * Class: valid 4 * Validation helper class. 3 * Validation helper class. 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 Validation 8 * @author Kohana Team 9 * @copyright (c) 2007-2008 Kohana Team 10 * @license http://kohanaphp.com/license.html 10 11 */ 11 12 class valid_Core { … … 30 31 * Validate email, RFC compliant version 31 32 * Note: This function is LESS strict than valid_email. Choose carefully. 32 * 33 * 33 34 * Originally by Cal Henderson, modified to fit Kohana syntax standards: 34 35 * - http://www.iamcal.com/publish/articles/php/parsing_email/ … … 299 300 * Returns: 300 301 * TRUE if string is a valid text, FALSE if not. 301 */ 302 */ 302 303 public static function standard_text($str) 303 304 {
