Source for file Sum.php

Documentation is available at Sum.php


1 <?php
2 /**
3 * This class adds things
4 * This class adds things
5 * @author Derick Rethans <derick@php.net>
6 * @copyright © 2002 by Derick Rethans
7 * @package PHPDocExample
8 */
9 /**
10 * @author Derick Rethans <derick@php.net>
11 * @copyright © 2002 by Derick Rethans
12 * @version $Id: $
13 * @package PHPDocExample
14 * @since version 0.3
15 * @abstract
16 */
17 class Sum {
18 /**
19 * @var string $type Type of the elements
20 */
21 var $type;
22
23 /**
24 * @var mixed $result Result of the summation
25 */
26 var $result;
27
28 /**
29 * Constructor
30 * @param string $type The type of the elements
31 */
32 function Sum ($type)
33 {
34 $this->type = $type;
35 }
36
37 /**
38 * Sum elements
39 *
40 * Sums elements
41 * @abstract
42 * @param mixed $elem1 The first element
43 * @param mixed $elem2 The second element
44 */
45 function sumElements ($elem1, $elem2)
46 {
47 return new SumError('Please overload this class');
48 }
49
50 /**
51 * Return the result of the summation
52 * @abstract
53 * @return mixed
54 */
55 function getResult ()
56 {
57 return $this->result;
58 }
59 }
60 ?>

Documentation generated on Tue, 18 Nov 2003 18:03:44 +0100 by phpDocumentor 1.2.2