1 |
<?php |
2 |
|
3 |
/** |
4 |
* This file contains the DesignPattern::Facade class. |
5 |
* |
6 |
* @author Andreas Motl <andreas.motl@ilo.de> |
7 |
* @package org.netfrag.glib |
8 |
* @name DesignPattern::Facade |
9 |
* |
10 |
*/ |
11 |
|
12 |
|
13 |
/** |
14 |
* <b>Cvs-Log:</b> |
15 |
* |
16 |
* <pre> |
17 |
* $Id: Facade.php,v 1.7 2003/03/10 23:30:27 joko Exp $ |
18 |
* |
19 |
* $Log: Facade.php,v $ |
20 |
* Revision 1.7 2003/03/10 23:30:27 joko |
21 |
* + fixed metadata for phpDocumentor |
22 |
* |
23 |
* Revision 1.6 2003/03/10 23:25:04 joko |
24 |
* + fixed metadata for phpDocumentor |
25 |
* |
26 |
* Revision 1.5 2003/03/10 22:31:56 joko |
27 |
* + fixed metadata for phpDocumentor |
28 |
* |
29 |
* Revision 1.4 2003/03/05 23:16:48 joko |
30 |
* updated docu - phpDocumentor is very strict about its 'blocks'... |
31 |
* |
32 |
* Revision 1.3 2003/03/05 17:28:43 joko |
33 |
* updated docu (phpDocumentor testing....) |
34 |
* |
35 |
* Revision 1.2 2003/03/05 17:02:22 joko |
36 |
* updated docu (phpDocumentor testing....) |
37 |
* |
38 |
* Revision 1.1 2003/03/03 21:56:01 joko |
39 |
* + initial commit |
40 |
* just a skeleton by now... |
41 |
* |
42 |
* </pre> |
43 |
* |
44 |
*/ |
45 |
|
46 |
|
47 |
/** |
48 |
* Load required modules: |
49 |
* |
50 |
*/ |
51 |
loadModule('Class::Logger'); |
52 |
|
53 |
|
54 |
/** |
55 |
* --- An attempt to implement some software design patterns... |
56 |
* --- FacadePattern |
57 |
* |
58 |
* --- http://c2.com/cgi-bin/wiki?FacadePattern |
59 |
* Intent: Provide a unified interface to a set of interfaces in a subsystem. |
60 |
* Facade defines a higher-level interface that makes the subsystem easier to use. |
61 |
* This can be used to simplify a number of complicated object interactions into a single interface. |
62 |
* |
63 |
* @author Andreas Motl <andreas.motl@ilo.de> |
64 |
* @copyright (c) 2003 - All Rights reserved. |
65 |
* @link http://www.netfrag.org/~joko/ |
66 |
* |
67 |
* @license GNU LGPL (GNU Lesser General Public License) |
68 |
* @link http://www.gnu.org/licenses/lgpl.txt |
69 |
* |
70 |
* @package org.netfrag.glib |
71 |
* @subpackage DesignPattern |
72 |
* @name DesignPattern::Facade |
73 |
* |
74 |
* @todo this: |
75 |
* - xyz |
76 |
* - bla, bli, blub |
77 |
* |
78 |
*/ |
79 |
class DesignPattern_Facade extends Class_Logger { |
80 |
|
81 |
var $_about; |
82 |
var $_container; |
83 |
|
84 |
function constructor() { |
85 |
parent::constructor(); |
86 |
//loadModule('Data::Container'); |
87 |
$this->_container = php::mkComponent('Data::Container'); |
88 |
} |
89 |
|
90 |
function perform() { |
91 |
$this->_abstract_method('perform', 'DesignPattern::Facade'); |
92 |
} |
93 |
|
94 |
function about() { |
95 |
$this->_about = |
96 |
<<<ABOUT |
97 |
* --- DesignPattern::Facade |
98 |
* --- http://cvs.netfrag.org/nfo/php/libs/org.netfrag.glib/DesignPattern/Facade.php |
99 |
* |
100 |
* http://c2.com/cgi-bin/wiki?FacadePattern says... |
101 |
* Intent: Provide a unified interface to a set of interfaces in a subsystem. |
102 |
* Facade defines a higher-level interface that makes the subsystem easier to use. |
103 |
* This can be used to simplify a number of complicated object interactions into a single interface. |
104 |
* http://www.fluffycat.com/java/patterns.html says... |
105 |
* One class has a method that performs a complex process calling several other classes. |
106 |
ABOUT; |
107 |
} |
108 |
|
109 |
} |
110 |
|
111 |
?> |