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