|
Open Journal Systems
3.3.0
|
Public Member Functions | |
| __construct ($sortingOrder=self::ORDER_ASC, $customOrder=null) | |
| compare (Comparable $a, Comparable $b) | |
Data Fields | |
| const | ORDER_ASC = "ASC" |
| const | ORDER_CUSTOM = "CUSTOM" |
| const | ORDER_DESC = "DESC" |
Protected Attributes | |
| $customOrder | |
| $sortingOrder | |
Definition at line 23 of file generic/citationStyleLanguage/lib/vendor/seboettg/collection/src/Seboettg/Collection/Comparator.php.
| Seboettg\Collection\Comparator::__construct | ( | $sortingOrder = self::ORDER_ASC, |
|
$customOrder = null |
|||
| ) |
Comparator constructor.
| string | $sortingOrder | defines the order (ascending|descending) for a comparison |
| mixed | $customOrder |
Definition at line 65 of file generic/citationStyleLanguage/lib/vendor/seboettg/collection/src/Seboettg/Collection/Comparator.php.
References Seboettg\Collection\Comparator\$customOrder, and Seboettg\Collection\Comparator\$sortingOrder.
|
abstract |
Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
| Comparable | $a | |
| Comparable | $b |
Reimplemented in Seboettg\Collection\Test\MyCustomOrderComparator, Seboettg\Collection\Test\MyDescendingComparator, and Seboettg\Collection\Test\MyAscendingComparator.
|
protected |
object/array which can be used to define a custom order
Definition at line 58 of file generic/citationStyleLanguage/lib/vendor/seboettg/collection/src/Seboettg/Collection/Comparator.php.
Referenced by Seboettg\Collection\Comparator\__construct().
|
protected |
defines the order (ascending|descending) for a comparison
Definition at line 49 of file generic/citationStyleLanguage/lib/vendor/seboettg/collection/src/Seboettg/Collection/Comparator.php.
Referenced by Seboettg\Collection\Comparator\__construct().
| const Seboettg\Collection\Comparator::ORDER_ASC = "ASC" |
static constant for sorting order ascending
Definition at line 29 of file generic/citationStyleLanguage/lib/vendor/seboettg/collection/src/Seboettg/Collection/Comparator.php.
| const Seboettg\Collection\Comparator::ORDER_CUSTOM = "CUSTOM" |
static constant for a custom sorting order
Definition at line 39 of file generic/citationStyleLanguage/lib/vendor/seboettg/collection/src/Seboettg/Collection/Comparator.php.
Referenced by Seboettg\Collection\Test\CollectionsTest\testSortCustomOrder().
| const Seboettg\Collection\Comparator::ORDER_DESC = "DESC" |
static constant for sorting order descending
Definition at line 34 of file generic/citationStyleLanguage/lib/vendor/seboettg/collection/src/Seboettg/Collection/Comparator.php.