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