SortHelper
in package
Table of Contents
Constants
- SORT_NUMERIC = 1
- SORT_REGULAR = 0
- SORT_STRING = 2
Properties
Methods
- asort() : bool
- Sort array maintaining index association
- getInstance() : mixed
- __construct() : mixed
- Set the language when construct
- getFlag() : int
- Return flag tupe depend on functoion sed
Constants
SORT_NUMERIC
public
int
SORT_NUMERIC
= 1
flag for numeric sort
SORT_REGULAR
public
int
SORT_REGULAR
= 0
flag for regular sort
SORT_STRING
public
int
SORT_STRING
= 2
flag for string sort
Properties
$collator
private
static Collator
$collator
= null
if possible
$instance
private
static self
$instance
= null
Singleton
$language
private
static string
$language
= null
current language
Methods
asort()
Sort array maintaining index association
public
asort(array<string|int, string> &$array[, int $flags = self::SORT_REGULAR ]) : bool
Parameters
- $array : array<string|int, string>
-
to sort
- $flags : int = self::SORT_REGULAR
-
in self::SORT_REGULAR (default or invalid), self::SORT_NUMERIC, self::SORT_STRING
Tags
Return values
bool —see Collator::asort
getInstance()
public
static getInstance(mixed $language) : mixed
Parameters
- $language : mixed
__construct()
Set the language when construct
private
__construct(mixed $language) : mixed
Parameters
- $language : mixed
getFlag()
Return flag tupe depend on functoion sed
private
static getFlag(mixed $type) : int
Parameters
- $type : mixed