<?php
/**
* @package DATA
*/
/**
* Interface for numerical objects.
*/
interface DATA_Number {
/**
* Returns the number in a native php type.
*
* @return int|float|string Number value.
*/
public function getNumber();
/**
* Adds this number to another and returns the result.
*
* @param DATA_Number $other The number to add.
* @return DATA_Number The result.
*/
public function add(DATA_Number $other);
/**
* Substracts this number to another and returns the result.
*
* @param DATA_Number $other The number to substract.
* @return DATA_Number The result.
*/
public function substract(DATA_Number $other);
/**
* Multiplies this number to another and returns the result.
*
* @param DATA_Number $other The number to multiply by.
* @return DATA_Number The result.
*/
public function multiply(DATA_Number $other);
/**
* Divides this number to another and returns the result.
*
* @param DATA_Number $other The number to divide by.
* @return DATA_Number The result.
*/
public function divide(DATA_Number $other);
}
?>
|