PHP Class Punic\Comparer

Mostra file Open project: punic/punic

Public Methods

Method Description
__construct ( string $locale = null, boolean $caseSensitive = false ) Initializes the instance.
compare ( string $a, string $b ) : integer Compare two strings.
sort ( array &$array, boolean $keepKeys = false ) : array

Private Methods

Method Description
normalize ( string $str ) : string

Method Details

__construct() public method

Initializes the instance.
public __construct ( string $locale = null, boolean $caseSensitive = false )
$locale string
$caseSensitive boolean

compare() public method

Compare two strings.
public compare ( string $a, string $b ) : integer
$a string
$b string
return integer

sort() public method

public sort ( array &$array, boolean $keepKeys = false ) : array
$array array
$keepKeys boolean
return array