root/tags/RELEASE_0_1_1/examples/MyClass.php

Revision 41, 0.7 kB (checked in by mikey, 2 years ago)

converted the TestInterfaces? example

Line 
1 <?php
2 /**
3  * Class for example purposes.
4  *
5  * @author  Stephan Schmidt <stephan.schmidt@schlund.de>
6  * @author  Frank Kleine <frank.kleine@schlund.de>
7  */
8 require dirname(__FILE__) . '/MyInterface.php';
9 /**
10  * Class for example purposes.
11  *
12  * @package     XJConf
13  * @subpackage  examples
14  */
15 class MyClass implements MyInterface
16 {
17     /**
18      * hold bar
19      *
20      * @var  MyInterface
21      */
22     private $bar;
23     
24     /**
25      * just foo
26      */
27     public function foo()
28     {
29         // nothing to do here
30     }
31     
32     /**
33      * set bar
34      *
35      * @param  MyInterface  $bar
36      */
37     public function setBar(MyInterface $bar)
38     {
39         $this->bar = $bar;
40     }
41     
42     /**
43      * return bar
44      *
45      * @return  MyInterface
46      */
47     public function getBar()
48     {
49         return $this->bar;
50     }
51 }
52 ?>
Note: See TracBrowser for help on using the browser.