PHP Classes

File: DATA/Number.php

Recommend this page to a friend!
  Classes of Martin Alterisio   DATA   DATA/Number.php   Download  
File: DATA/Number.php
Role: Class source
Content type: text/plain
Description: Interface for numerical objects.
Class: DATA
Access data stored in MySQL tables like arrays
Author: By
Last change: + anonymous access
Date: 16 years ago
Size: 1,226 bytes
 

Contents

Class file image Download
<?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);
}
?>