VuFind API Documentation

SorterInterface
in

Interface SorterInterface

Tags
category

VuFind

author

Josef Moravec moravec@mzk.cz

license

https://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Table of Contents

asort()  : bool
Sort array by values and maintain index association
compare()  : int
Compare function
natsort()  : bool
Natural sort by values and maintain index association
sort()  : bool
Sort array by values

Methods

asort()

Sort array by values and maintain index association

public asort(array<string|int, mixed> &$array) : bool
Parameters
$array : array<string|int, mixed>

Array to sort

Return values
bool

compare()

Compare function

public compare(string $string1, string $string2) : int
Parameters
$string1 : string

First string to compare

$string2 : string

Second string to compare

Return values
int

natsort()

Natural sort by values and maintain index association

public natsort(array<string|int, mixed> &$array) : bool
Parameters
$array : array<string|int, mixed>

Array to sort

Return values
bool

sort()

Sort array by values

public sort(array<string|int, mixed> &$array) : bool
Parameters
$array : array<string|int, mixed>

Array to sort

Return values
bool

Search results