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