Source for file abstract.php

Documentation is available at abstract.php


1 <?php
2 /**
3 * @package Examples
4 * @author Derick Rethans <derick@php.net>
5 */
6
7 /**
8 * Example class to show @abstract
9 *
10 * Abstract class to add two elements
11 *
12 * @package Examples
13 * @abstract
14 */
15 class Sum {
16
17 /**
18 * Sum function
19 *
20 * This function adds two elements and stores the result
21 *
22 * @abstract
23 * @param mixed $e1 The first element
24 * @param mixed $e2 The second element
25 */
26 function Sum ($e1, $e2) {
27 ;
28 }
29 }
30
31 /**
32 * Example inherited class
33 *
34 * Add two arrays
35 * @package Examples
36 */
37 class SumArray extends Sum {
38
39 /**
40 * Add two arrays
41 *
42 * @param array $a1 The first array
43 * @param array $a2 The second array
44 */
45 function Sum ($a1, $a2) {
46 return array_merge($a1, $a2);
47 }
48 }
49 ?>

Documentation generated on Tue, 18 Nov 2003 18:06:09 +0100 by phpDocumentor 1.2.2