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