Documentation

Comparable

Comparable interface that allows to compare two value objects to each other for similarity.

Tags
link
www.doctrine-project.org

Table of Contents

Methods

compareTo()  : int
Compares the current object to the passed $other.

Methods

compareTo()

Compares the current object to the passed $other.

public compareTo(mixed $other) : int

Returns 0 if they are semantically equal, 1 if the other object is less than the current one, or -1 if its more than the current one.

This method should not check for identity using ===, only for semantical equality for example when two different DateTime instances point to the exact same Date + TZ.

Parameters
$other : mixed
Return values
int

        
On this page

Search results