Chris@0: . Chris@0: */ Chris@0: Chris@0: namespace Doctrine\Common; Chris@0: Chris@0: /** Chris@0: * Comparable interface that allows to compare two value objects to each other for similarity. Chris@0: * Chris@0: * @link www.doctrine-project.org Chris@0: * @since 2.2 Chris@0: * @author Benjamin Eberlei Chris@0: * @author Guilherme Blanco Chris@0: */ Chris@0: interface Comparable Chris@0: { Chris@0: /** Chris@0: * Compares the current object to the passed $other. Chris@0: * Chris@0: * Returns 0 if they are semantically equal, 1 if the other object Chris@0: * is less than the current one, or -1 if its more than the current one. Chris@0: * Chris@0: * This method should not check for identity using ===, only for semantical equality for example Chris@0: * when two different DateTime instances point to the exact same Date + TZ. Chris@0: * Chris@0: * @param mixed $other Chris@0: * Chris@0: * @return int Chris@0: */ Chris@0: public function compareTo($other); Chris@0: }