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