Changeset 933
- Timestamp:
- 11/01/2007 04:04:10 AM (13 months ago)
- Location:
- trunk/system/core
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/core/Event.php
r889 r933 3 3 * Class: Event 4 4 * Process queuing/execution class. Allows an unlimited number of callbacks 5 * to be added to "events". Events can be run multiple times, and can also5 * to be added to 'events'. Events can be run multiple times, and can also 6 6 * process event-specific data. By default, Kohana has several system events. 7 7 * … … 31 31 * 32 32 * About: system.post_controller 33 * Called within syste .execute, after the controller object is created.33 * Called within system.execute, after the controller object is created. 34 34 * Kohana::instance() will return the controller at this point, and views can 35 35 * be loaded. 36 36 * 37 37 * About: system.send_headers 38 * Called just before the global output buffer is closed, before any content38 * Called just before the global output buffer is closed, before any content 39 39 * is displayed. Writing cookies is not possible after this point, and 40 40 * <Session> data will not be saved. … … 43 43 * Displays the output that Kohana has generated. Views can be loaded, but 44 44 * headers have already been sent. The rendered output, Kohana::$output, can 45 * be manip luated.45 * be manipulated. 46 46 * 47 47 * About: system.shutdown -
trunk/system/core/utf8.php
r902 r933 130 130 * 131 131 * Returns: 132 * TRUE or FALSE, whether the string is ASCII 132 * TRUE or FALSE, whether the string is ASCII. 133 133 */ 134 134 public static function is_ascii($str) … … 170 170 * Method: transliterate_to_ascii 171 171 * Replaces special/accented UTF-8 characters by ASCII-7 'equivalents'. 172 * Original function (accents_to_ascii) written by Andreas Gohr <andi@splitbrain.org> for phputf8 173 * 174 * Parameters: 175 * str - string to transliterate176 * int- -1 lowercase only, +1 uppercase only, 0 both cases177 * 178 * Returns: 179 * String with only ASCII characters 172 * Original function (accents_to_ascii) written by Andreas Gohr <andi@splitbrain.org> for phputf8. 173 * 174 * Parameters: 175 * str - string to transliterate 176 * case - -1 lowercase only, +1 uppercase only, 0 both cases 177 * 178 * Returns: 179 * String with only ASCII characters. 180 180 */ 181 181 public static function transliterate_to_ascii($str, $case = 0) … … 274 274 /* 275 275 * Method: strpos 276 * Find position of first occurrence of a UTF-8 string277 * Original function written by Harry Fuecks <hfuecks@gmail.com> for phputf8 278 * 279 * Parameters: 280 * str - haystack281 * s tr- needle282 * int - offset: allows you to specifywhich character in haystack to start searching276 * Finds position of first occurrence of a UTF-8 string. 277 * Original function written by Harry Fuecks <hfuecks@gmail.com> for phputf8. 278 * 279 * Parameters: 280 * str - haystack 281 * search - needle 282 * offset - allows you to specify from which character in haystack to start searching 283 283 * 284 284 * Returns: … … 311 311 /* 312 312 * Method: strrpos 313 * Find position of last occurrence of a char in a UTF-8 string314 * Original function written by Harry Fuecks <hfuecks@gmail.com> for phputf8 315 * 316 * Parameters: 317 * str - haystack318 * s tr- needle319 * int - offset: allows you to specifywhich character in haystack to start searching313 * Finds position of last occurrence of a char in a UTF-8 string. 314 * Original function written by Harry Fuecks <hfuecks@gmail.com> for phputf8. 315 * 316 * Parameters: 317 * str - haystack 318 * search - needle 319 * offset - allows you to specify from which character in haystack to start searching 320 320 * 321 321 * Returns: … … 348 348 /* 349 349 * Method: substr 350 * Return part of a UTF-8 string351 * Original function written by Chris Smith <chris@jalakai.co.uk> for phputf8 352 * 353 * Parameters: 354 * str - input string355 * int - start (offset)356 * int - length357 * 358 * Returns: 359 * Returns the portion of string specified by the start and length parameters or FALSE on failure.350 * Returns part of a UTF-8 string. 351 * Original function written by Chris Smith <chris@jalakai.co.uk> for phputf8. 352 * 353 * Parameters: 354 * str - input string 355 * offset - start 356 * length - 357 * 358 * Returns: 359 * The portion of string specified by the start and length parameters or FALSE on failure. 360 360 */ 361 361 public static function substr($str, $offset, $length = NULL) … … 437 437 /* 438 438 * Method: substr_replace 439 * Replace text within a portion of a UTF-8 string440 * Original function written by Harry Fuecks <hfuecks@gmail.com> for phputf8 441 * 442 * Parameters: 443 * str - input string444 * str- replacement string445 * int - start (offset)446 * int - length439 * Replaces text within a portion of a UTF-8 string. 440 * Original function written by Harry Fuecks <hfuecks@gmail.com> for phputf8. 441 * 442 * Parameters: 443 * str - input string 444 * replacement - replacement string 445 * offset - start 446 * length - 447 447 * 448 448 * Returns: … … 466 466 /* 467 467 * Method: strtolower 468 * Makes a UTF-8 string lowercase 469 * Original function written by Andreas Gohr <andi@splitbrain.org> for phputf8 468 * Makes a UTF-8 string lowercase. 469 * Original function written by Andreas Gohr <andi@splitbrain.org> for phputf8. 470 470 * 471 471 * Parameters: … … 473 473 * 474 474 * Returns: 475 * Lowercase UTF-8 string 475 * Lowercase UTF-8 string. 476 476 */ 477 477 public static function strtolower($str) … … 557 557 /* 558 558 * Method: strtoupper 559 * Makes a UTF-8 string uppercase 560 * Original function written by Andreas Gohr <andi@splitbrain.org> for phputf8 559 * Makes a UTF-8 string uppercase. 560 * Original function written by Andreas Gohr <andi@splitbrain.org> for phputf8. 561 561 * 562 562 * Parameters: … … 564 564 * 565 565 * Returns: 566 * Uppercase UTF-8 string 566 * Uppercase UTF-8 string. 567 567 */ 568 568 public static function strtoupper($str) … … 648 648 /* 649 649 * Method: ucfirst 650 * Makes a UTF-8 string's first character uppercase 651 * Original function written by Harry Fuecks <hfuecks@gmail.com> for phputf8 650 * Makes a UTF-8 string's first character uppercase. 651 * Original function written by Harry Fuecks <hfuecks@gmail.com> for phputf8. 652 652 * 653 653 * Parameters: … … 655 655 * 656 656 * Returns: 657 * UTF-8 string with first character in uppercase 657 * UTF-8 string with first character in uppercase. 658 658 */ 659 659 public static function ucfirst($str) … … 670 670 /* 671 671 * Method: ucwords 672 * Makes the first character of every word in a UTF-8 string uppercase 673 * Original function written by Harry Fuecks <hfuecks@gmail.com> for phputf8 672 * Makes the first character of every word in a UTF-8 string uppercase. 673 * Original function written by Harry Fuecks <hfuecks@gmail.com> for phputf8. 674 674 * 675 675 * Parameters: … … 677 677 * 678 678 * Returns: 679 * UTF-8 string with first character of every word in uppercase 679 * UTF-8 string with first character of every word in uppercase. 680 680 */ 681 681 public static function ucwords($str) … … 701 701 /* 702 702 * Method: strcasecmp 703 * Case-insensitive UTF-8 string comparison 704 * Original function written by Harry Fuecks <hfuecks@gmail.com> for phputf8 705 * 706 * Parameters: 707 * str - first string708 * str - second string709 * 710 * Returns: 711 * Returnsinteger < 0 if str1 is less than str2; > 0 if str1 is greater than str2, and 0 if they are equal.703 * Case-insensitive UTF-8 string comparison. 704 * Original function written by Harry Fuecks <hfuecks@gmail.com> for phputf8. 705 * 706 * Parameters: 707 * str1 - first string 708 * str2 - second string 709 * 710 * Returns: 711 * integer < 0 if str1 is less than str2; > 0 if str1 is greater than str2, and 0 if they are equal. 712 712 */ 713 713 public static function strcasecmp($str1, $str2) … … 725 725 /* 726 726 * Method: str_ireplace 727 * Returns a string or an array with all occurrences of search in subject (ignoring case) 727 * Returns a string or an array with all occurrences of search in subject (ignoring case). 728 728 * replaced with the given replace value. 729 * Note: it's not fast and gets slower if $search and/or $replace are arrays 730 * Original function written by Harry Fuecks <hfuecks@gmail.com> for phputf8 731 * 732 * Parameters: 733 * mixed- string or array with text to replace734 * mixed- string or array with replacement text735 * mixed- string or array with subject text736 * int - number of matched and replaced needles will be returned via this parameter which is passed by reference729 * Note: it's not fast and gets slower if $search and/or $replace are arrays. 730 * Original function written by Harry Fuecks <hfuecks@gmail.com> for phputf8. 731 * 732 * Parameters: 733 * search - string or array with text to replace 734 * replace - string or array with replacement text 735 * str - string or array with subject text 736 * count - number of matched and replaced needles will be returned via this parameter which is passed by reference 737 737 * 738 738 * Returns: … … 1203 1203 * The Original Code is Mozilla Communicator client code. 1204 1204 * The Initial Developer of the Original Code is Netscape Communications Corporation. 1205 * Portions created by the Initial Developer are Copyright (C) 1998 the Initial Developer 1206 * Ported to PHP by Henri Sivonen <hsivonen@iki.fi>, see http://hsivonen.iki.fi/php-utf8/ 1207 * Slight modifications to fit with phputf8 library by Harry Fuecks <hfuecks@gmail.com> 1205 * Portions created by the Initial Developer are Copyright (C) 1998 the Initial Developer. 1206 * Ported to PHP by Henri Sivonen <hsivonen@iki.fi>, see http://hsivonen.iki.fi/php-utf8/. 1207 * Slight modifications to fit with phputf8 library by Harry Fuecks <hfuecks@gmail.com>. 1208 1208 * 1209 1209 * Parameters: … … 1211 1211 * 1212 1212 * Returns: 1213 * array of unicode code points or FALSE if UTF-8 invalid1213 * Array of unicode code points or FALSE if UTF-8 invalid. 1214 1214 */ 1215 1215 public static function to_unicode($str) … … 1353 1353 * The Original Code is Mozilla Communicator client code. 1354 1354 * The Initial Developer of the Original Code is Netscape Communications Corporation. 1355 * Portions created by the Initial Developer are Copyright (C) 1998 the Initial Developer 1356 * Ported to PHP by Henri Sivonen <hsivonen@iki.fi>, see http://hsivonen.iki.fi/php-utf8/ 1357 * Slight modifications to fit with phputf8 library by Harry Fuecks <hfuecks@gmail.com> 1358 * 1359 * Parameters: 1360 * arr ay- array of unicode code points representing a string1361 * 1362 * Returns: 1363 * UTF-8 string or FALSE if array contains invalid code points 1355 * Portions created by the Initial Developer are Copyright (C) 1998 the Initial Developer. 1356 * Ported to PHP by Henri Sivonen <hsivonen@iki.fi>, see http://hsivonen.iki.fi/php-utf8/. 1357 * Slight modifications to fit with phputf8 library by Harry Fuecks <hfuecks@gmail.com>. 1358 * 1359 * Parameters: 1360 * arr - array of unicode code points representing a string 1361 * 1362 * Returns: 1363 * UTF-8 string or FALSE if array contains invalid code points. 1364 1364 */ 1365 1365 public static function from_unicode($arr)
