|
Moodle
2.2.1
http://www.collinsharper.com
|
Static Public Member Functions | |
| static | asort (array &$arr, $sortflag=null) |
| static | compare ($str1, $str2) |
| static | asort_objects_by_property (array &$objects, $property) |
| static | asort_objects_by_method (array &$objects, $method) |
Static Protected Member Functions | |
| static | ensure_collator_available () |
Static Protected Attributes | |
| static | $collator = null |
| static | $locale = null |
Definition at line 604 of file textlib.class.php.
Locale aware sorting, the key associations are kept, values are sorted alphabetically.
| array | $arr | array to be sorted (reference) |
| int | $sortflag | One of Collator::SORT_REGULAR, Collator::SORT_NUMERIC, Collator::SORT_STRING |
Definition at line 681 of file textlib.class.php.

| static asort_objects_by_method | ( | array &$ | objects, |
| $ | method | ||
| ) | [static] |
Locale aware sort of objects by a method in common to all objects
| array | $objects | An array of objects to sort (handled by reference) |
| string | $method | The method to call to generate a value for comparison |
Definition at line 728 of file textlib.class.php.

| static asort_objects_by_property | ( | array &$ | objects, |
| $ | property | ||
| ) | [static] |
Locale aware sort of objects by a property in common to all objects
| array | $objects | An array of objects to sort (handled by reference) |
| string | $property | The property to use for comparison |
Definition at line 716 of file textlib.class.php.

| static compare | ( | $ | str1, |
| $ | str2 | ||
| ) | [static] |
Locale aware comparison of two strings.
Returns: 1 if str1 is greater than str2 0 if str1 is equal to str2 -1 if str1 is less than str2
Definition at line 702 of file textlib.class.php.
| static ensure_collator_available | ( | ) | [static, protected] |
Ensures that a collator is available and created
Definition at line 617 of file textlib.class.php.

$collator = null [static, protected] |
Definition at line 607 of file textlib.class.php.
$locale = null [static, protected] |
Definition at line 610 of file textlib.class.php.