コード例 #1
0
ファイル: Uuid.php プロジェクト: rodion-k/uuid
 public function compareTo(UuidInterface $other)
 {
     $comparison = 0;
     if ($this->getMostSignificantBitsHex() < $other->getMostSignificantBitsHex()) {
         $comparison = -1;
     } elseif ($this->getMostSignificantBitsHex() > $other->getMostSignificantBitsHex()) {
         $comparison = 1;
     } elseif ($this->getLeastSignificantBitsHex() < $other->getLeastSignificantBitsHex()) {
         $comparison = -1;
     } elseif ($this->getLeastSignificantBitsHex() > $other->getLeastSignificantBitsHex()) {
         $comparison = 1;
     }
     return $comparison;
 }