Symfony\Component\Intl\Collator\Collator
Replacement for PHP's native {@link \Collator} class.
The only methods currently supported in this class are:
- - - - - -
- Author: Igor Wiedler <igor@wiedler.ch>
Synopsis
class Collator
{
- // constants
- const FRENCH_COLLATION = 0;
- const ALTERNATE_HANDLING = 1;
- const CASE_FIRST = 2;
- const CASE_LEVEL = 3;
- const NORMALIZATION_MODE = 4;
- const STRENGTH = 5;
- const HIRAGANA_QUATERNARY_MODE = 6;
- const NUMERIC_COLLATION = 7;
- const DEFAULT_VALUE = 1;
- const PRIMARY = 0;
- const SECONDARY = 1;
- const TERTIARY = 2;
- const DEFAULT_STRENGTH = 2;
- const QUATERNARY = 3;
- const IDENTICAL = 15;
- const OFF = 16;
- const ON = 17;
- const SHIFTED = 20;
- const NON_IGNORABLE = 21;
- const LOWER_FIRST = 24;
- const UPPER_FIRST = 25;
- const SORT_REGULAR = 0;
- const SORT_NUMERIC = 2;
- const SORT_STRING = 1;
- // methods
- public void __construct()
- public static Collator create()
- public Boolean asort()
- public Boolean|int compare()
- public Boolean|int getAttribute()
- public int getErrorCode()
- public string getErrorMessage()
- public string getLocale()
- public string getSortKey()
- public Boolean|int getStrength()
- public Boolean setAttribute()
- public Boolean setStrength()
- public Boolean sortWithSortKeys()
- public Boolean sort()
Hierarchy
Extended by
Constants
Name | Value |
---|---|
FRENCH_COLLATION | 0 |
ALTERNATE_HANDLING | 1 |
CASE_FIRST | 2 |
CASE_LEVEL | 3 |
NORMALIZATION_MODE | 4 |
STRENGTH | 5 |
HIRAGANA_QUATERNARY_MODE | 6 |
NUMERIC_COLLATION | 7 |
DEFAULT_VALUE | 1 |
PRIMARY | 0 |
SECONDARY | 1 |
TERTIARY | 2 |
DEFAULT_STRENGTH | 2 |
QUATERNARY | 3 |
IDENTICAL | 15 |
OFF | 16 |
ON | 17 |
SHIFTED | 20 |
NON_IGNORABLE | 21 |
LOWER_FIRST | 24 |
UPPER_FIRST | 25 |
SORT_REGULAR | 0 |
SORT_NUMERIC | 2 |
SORT_STRING | 1 |
Methods
public
- __construct() — Constructor
- asort() — Sort array maintaining index association
- compare() — Not supported. Compare two Unicode strings
- create() — Static constructor
- getAttribute() — Not supported. Get a value of an integer collator attribute
- getErrorCode() — Returns collator's last error code. Always returns the U_ZERO_ERROR class constant value
- getErrorMessage() — Returns collator's last error message. Always returns the U_ZERO_ERROR_MESSAGE class constant value
- getLocale() — Returns the collator's locale
- getSortKey() — Not supported. Get sorting key for a string
- getStrength() — Not supported. Get current collator's strength
- setAttribute() — Not supported. Set a collator's attribute
- setStrength() — Not supported. Set the collator's strength
- sort() — Not supported. Sort array using specified collator
- sortWithSortKeys() — Not supported. Sort array using specified collator and sort keys