Interface Comparable
Comparable conform classes implement a comparator method to compare two
objects to determine an ordering for a set of objects. Implementations may
decide to allow comparison to any type of value.
Namespace: Core
Package: Core
Since:
3.0
Requires:
PHP 5.3
Version:
1.0
Located at Object.inc.php
Methods summary
public
integer
|
#
compareTo( mixed $var )
Compares the current object with another value or object.
Compares the current object with another value or object.
Implementations must never refer to the Core\Comparable::compareTo() method of a
provided object, otherwise deadlocks may occur.
Parameters
- $var
- Value or object to compare current object with.
Returns
integer Returns < 0, if the current object is less than the parameter value; >
0 if the current object is greater than the parameter value, and 0 if
both are equal.
Since
3.0
|