Back to index

php5  5.3.10
collator_api.php
Go to the documentation of this file.
00001 <?php
00002 #############################################################################
00003 # Object-oriented API
00004 #############################################################################
00005 
00020 class Collator {
00021 #############################################################################
00022 # Common constants.
00023 #############################################################################
00024 
00030        const ULOC_ACTUAL_LOCALE    = 0;
00031        const ULOC_VALID_LOCALE     = 1;
00032        const ULOC_REQUESTED_LOCALE = 2;
00033 
00034        /*
00035         * WARNING:
00036         * The values described here are NOT the actual values in PHP code.
00037         * They are references to the ICU C definitions, so the line
00038         *    const DEFAULT_STRENGTH = 'UCOL_DEFAULT_STRENGTH';
00039         * actually means that Collator::DEFAULT_STRENGTH is the same as
00040         * UCOL_DEFAULT_STRENGTH constant in the ICU library.
00041         */
00048     const DEFAULT_VALUE    = 'UCOL_DEFAULT';
00049     const PRIMARY          = 'UCOL_PRIMARY';
00050     const SECONDARY        = 'UCOL_SECONDARY';
00051     const TERTIARY         = 'UCOL_TERTIARY';
00052     const DEFAULT_STRENGTH = 'UCOL_DEFAULT_STRENGTH';
00053     const QUATERNARY       = 'UCOL_QUATERNARY';
00054     const IDENTICAL        = 'UCOL_IDENTICAL';
00055     const OFF              = 'UCOL_OFF';
00056     const ON               = 'UCOL_ON';
00057     const SHIFTED          = 'UCOL_SHIFTED';
00058     const NON_IGNORABLE    = 'UCOL_NON_IGNORABLE';
00059     const LOWER_FIRST      = 'UCOL_LOWER_FIRST';
00060     const UPPER_FIRST      = 'UCOL_UPPER_FIRST';
00061 
00068     const FRENCH_COLLATION         = 'UCOL_FRENCH_COLLATION';
00069     const ALTERNATE_HANDLING       = 'UCOL_ALTERNATE_HANDLING';
00070     const CASE_FIRST               = 'UCOL_CASE_FIRST';
00071     const CASE_LEVEL               = 'UCOL_CASE_LEVEL';
00072     const NORMALIZATION_MODE       = 'UCOL_NORMALIZATION_MODE';
00073     const STRENGTH                 = 'UCOL_STRENGTH';
00074     const HIRAGANA_QUATERNARY_MODE = 'UCOL_HIRAGANA_QUATERNARY_MODE';
00075     const NUMERIC_COLLATION        = 'UCOL_NUMERIC_COLLATION';
00076 
00090     public function __construct( $locale ) {}
00091 
00106     public static function create( $locale ) {}
00107 
00114     public function getErrorCode() {}
00115 
00122     public function getErrorMessage() {}
00123 
00137     public function compare( $str1, $str2 ) {}
00138 
00151     public function sort( $arr, $sort_flags ) {}
00152 
00165     public function asort( $arr, $sort_flags ) {}
00166 
00177     public function sortWithSortKeys( $arr ) {}
00178 
00192     public function getAttribute( $attr ) {}
00193 
00204     public function setAttribute( $attr, $val ) {}
00205 
00213     public function getStrength() {}
00214 
00224     public function setStrength( $strength ) {}
00225 
00242     public function getLocale( $type ) {}
00243 }
00244 
00245 #############################################################################
00246 # Procedural API
00247 #############################################################################
00248 
00262 function collator_create( $locale ) {}
00263 
00280 function collator_compare( $coll, $str1, $str2 ) {}
00281 
00295 function collator_sort( $coll, $arr, $sort_flags ) {}
00296 
00308 function collator_asort( $coll, $arr, $sort_flags ) {}
00309 
00321 function collator_sort_with_sort_keys( $coll, $arr ) {}
00322 
00337 function collator_get_locale( $coll, $type ) {}
00338 
00347 function collator_get_attribute( $coll, $attr ) {}
00348 
00356 function collator_get_strength( $coll ) {}
00357 
00366 function collator_set_strength( $coll, $strength ) {}
00367 
00377 function collator_set_attribute( $coll, $attr, $val ) {}
00378 
00387 function collator_get_error_code( $coll ) {}
00388 
00397 function collator_get_error_message( $coll ) {}