rfc:uconverter

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:uconverter [2012/11/01 18:35] – [Specification of the Class] Rename class constants pollitarfc:uconverter [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 3: Line 3:
   * Date: 2012-10-29   * Date: 2012-10-29
   * Author: Sara Golemon <pollita@php.net>   * Author: Sara Golemon <pollita@php.net>
-  * Status: Under Discussion+  * Status: Implemented for 5.5 http://git.php.net/?p=php-src.git;a=commit;h=5ac35770f45e295cab1ed3c166131d11c27655f6
   * First Published at: http://wiki.php.net/rfc/uconverter   * First Published at: http://wiki.php.net/rfc/uconverter
  
 Exposes ICU's UConverter functions by adding a class to the ext/intl extension Exposes ICU's UConverter functions by adding a class to the ext/intl extension
 +===== Vote =====
 +
 +<doodle 
 +title="Should the current UConverter implementation be merged" auth="cataphract" voteType="single" closed="True">
 +   * Yes
 +   * No
 +</doodle>
  
 ===== Introduction ===== ===== Introduction =====
Line 77: Line 84:
          
     /* Default callback functions */     /* Default callback functions */
-    string toUCallback  (UConverterCallbackReason $reason, string $source, string $codeUnits, UErrorCode &$error); +    mixed toUCallback  (UConverterCallbackReason $reason, string $source, string $codeUnits, UErrorCode &$error); 
-    string fromUCallback(UConverterCallbackReason $reason, Array  $source, long   $codePoint, UErrorCode &$error);+    mixed fromUCallback(UConverterCallbackReason $reason, Array  $source, long   $codePoint, UErrorCode &$error);
          
     /* Primary conversion workhorses */     /* Primary conversion workhorses */
Line 141: Line 148:
   class MyConverter extends UConverter {   class MyConverter extends UConverter {
     public function fromUCallback($reason, $source, $codepoint, &$error) {     public function fromUCallback($reason, $source, $codepoint, &$error) {
-      if (($reason == UConverter::UCNV_UNASSIGNED) && ($codepoint == 0x00F1)) {+      if (($reason == UConverter::REASON_UNASSIGNED) && ($codepoint == 0x00F1)) {
         // Basic transliteration 'ñ' to 'n'         // Basic transliteration 'ñ' to 'n'
         $error = U_ZERO_ERROR;         $error = U_ZERO_ERROR;
rfc/uconverter.1351794959.txt.gz · Last modified: 2017/09/22 13:28 (external edit)