D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
psa
/
admin
/
plib
/
modules
/
advisor
/
vendor
/
icecave
/
parity
/
src
/
Filename :
SelfComparable.php
back
Copy
<?php namespace PleskAdvisor\Icecave\Parity; /** * An object that can compare itself to other objects of exactly the same type. */ interface SelfComparable { /** * Compare this object with another object of the same type, yielding a * result according to the following table: * * +--------------------+---------------+ * | Condition | Result | * +--------------------+---------------+ * | $this == $value | $result === 0 | * | $this < $value | $result < 0 | * | $this > $value | $result > 0 | * +--------------------+---------------+ * * @param object $value The object to compare. * * @return int The result of the comparison. * @throws Exception\NotComparableException if $value is not the same type as $this. */ public function compare($value) : int; }