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