Documentation

Horde_Array_Sort_Helper
in package

Helper class for sorting arrays on arbitrary criteria for usort/uasort.

Copyright 2003-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Tags
author

Marko Djukic marko@oblo.com

author

Jan Schneider jan@horde.org

author

Michael Slusarz slusarz@horde.org

category

Horde

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

Table of Contents

$key  : string
The array key to sort by.
compare()  : mixed
Compare two associative arrays by the array key defined in self::$key.
compareKeys()  : TODO
Compare array keys case insensitively for uksort.
reverseCompare()  : TODO
Compare, in reverse order, two associative arrays by the array key defined in self::$key.
reverseCompareKeys()  : TODO
Compare, in reverse order, array keys case insensitively for uksort.

Properties

$key

The array key to sort by.

public string $key

Methods

compare()

Compare two associative arrays by the array key defined in self::$key.

public compare(array<string|int, mixed> $a, array<string|int, mixed> $b) : mixed
Parameters
$a : array<string|int, mixed>
$b : array<string|int, mixed>
Return values
mixed

compareKeys()

Compare array keys case insensitively for uksort.

public compareKeys(scalar $a, scalar $b) : TODO
Parameters
$a : scalar

TODO

$b : scalar

TODO

Return values
TODO

reverseCompare()

Compare, in reverse order, two associative arrays by the array key defined in self::$key.

public reverseCompare(scalar $a, scalar $b) : TODO
Parameters
$a : scalar

TODO

$b : scalar

TODO

Return values
TODO

reverseCompareKeys()

Compare, in reverse order, array keys case insensitively for uksort.

public reverseCompareKeys(scalar $a, scalar $b) : TODO
Parameters
$a : scalar

TODO

$b : scalar

TODO

Return values
TODO

Search results