| 1 | <?php | <?php | 
|  |  |  | 
| 2 | /** | /** | 
| 3 | * This file contains the DesignPattern::Proxy class. | * This file contains the DesignPattern::Proxy class | 
| 4 | * | * | 
| 5 | * @author Andreas Motl <andreas.motl@ilo.de> | * @author Andreas Motl <andreas.motl@ilo.de> | 
| 6 | * @module DesignPattern::Proxy | * @package org.netfrag.glib | 
| 7 |  | * @name DesignPattern::Proxy | 
| 8 |  | * | 
| 9 | * | * | 
| 10 | */ | */ | 
| 11 |  |  | 
| 12 | /** |  | 
| 13 |  | /** | 
| 14 |  | * | 
| 15 |  | * | 
| 16 |  | * <b>Cvs-Log:</b> | 
| 17 |  | * | 
| 18 |  | * <pre> | 
| 19 | * $Id$ | * $Id$ | 
| 20 | * | * | 
| 21 | * $Log$ | * $Log$ | 
| 22 |  | * Revision 1.7  2003/03/10 23:30:30  joko | 
| 23 |  | * + fixed metadata for phpDocumentor | 
| 24 |  | * | 
| 25 |  | * Revision 1.6  2003/03/10 22:31:56  joko | 
| 26 |  | * + fixed metadata for phpDocumentor | 
| 27 |  | * | 
| 28 |  | * Revision 1.5  2003/03/05 17:28:43  joko | 
| 29 |  | * updated docu (phpDocumentor testing....) | 
| 30 |  | * | 
| 31 |  | * Revision 1.4  2003/03/05 16:32:18  joko | 
| 32 |  | * updated docu (phpDocumentor testing....) | 
| 33 |  | * | 
| 34 |  | * Revision 1.3  2003/03/05 16:10:17  joko | 
| 35 |  | * updated docu (phpDocumentor testing....) | 
| 36 |  | * | 
| 37 | * Revision 1.2  2003/03/05 12:12:42  joko | * Revision 1.2  2003/03/05 12:12:42  joko | 
| 38 | * re-renamed methods and privates: _handler becomes _proxy again | * re-renamed methods and privates: _handler becomes _proxy again | 
| 39 | * | * | 
| 40 | * Revision 1.1  2003/03/03 22:05:25  joko | * Revision 1.1  2003/03/03 22:05:25  joko | 
| 41 | * abstract implementation...  ;-) | * abstract implementation...  ;-) | 
| 42 |  | * </pre> | 
| 43 |  | * | 
| 44 | * | * | 
| 45 |  | */ | 
| 46 |  |  | 
| 47 |  |  | 
| 48 |  | /** | 
| 49 |  | * Load required modules: | 
| 50 | * | * | 
| 51 | */ | */ | 
| 52 |  | loadModule('Class::Logger'); | 
| 53 |  |  | 
| 54 |  |  | 
| 55 | /** | /** | 
| 56 | * --- An attempt to implement some software design patterns... | * An attempt to implement some software design patterns... | 
| 57 | * --- ProxyPattern | * --- ProxyPattern | 
| 58 | * | * | 
| 59 | * --- http://c2.com/cgi-bin/wiki?ProxyPattern | * @link http://c2.com/cgi-bin/wiki?ProxyPattern | 
| 60 | * | * | 
| 61 | * @author Andreas Motl <andreas.motl@ilo.de> | * @author Andreas Motl <andreas.motl@ilo.de> | 
| 62 |  | * @link http://www.netfrag.org/~joko/ | 
| 63 |  | * | 
| 64 | * @copyright (c) 2003 - All Rights reserved. | * @copyright (c) 2003 - All Rights reserved. | 
| 65 | * @license GNU LGPL (GNU Lesser General Public License) | * @license GNU LGPL (GNU Lesser General Public License) | 
| 66 | * | * @link http://www.gnu.org/licenses/lgpl.txt | 
|  | * @author-url http://www.netfrag.org/~joko/ |  | 
|  | * @license-url http://www.gnu.org/licenses/lgpl.txt |  | 
| 67 | * | * | 
| 68 | * @package org.netfrag.glib | * @package org.netfrag.glib | 
| 69 | * @module DesignPattern::Proxy | * @subpackage DesignPattern | 
| 70 | * | * @name DesignPattern::Proxy | 
|  | */ |  | 
|  |  |  | 
|  | /** |  | 
|  | * Todo: |  | 
|  | * |  | 
|  | *    x DesignPattern::DecoratorProxy  (->decorate) |  | 
|  | *    x DesignPattern::TransparentProxy  (->make_transparent) |  | 
|  | *    o DesignPattern::MultiProxy   (->both???) (diamond inheritance? possible in php?) |  | 
|  | *    o DesignPattern::GenericAdapterProxy??? |  | 
|  | *      o no 'locator/query' or 'type/component' |  | 
|  | *      o even more generic: just 'adapter_metadata'    (-> global adapter registry?) |  | 
|  |  |  | 
|  |  |  | 
| 71 | * | * | 
| 72 |  | * @todo (x) DesignPattern::DecoratorProxy  (->decorate) | 
| 73 |  | * @todo (x) DesignPattern::TransparentProxy  (->make_transparent) | 
| 74 |  | * @todo (o) DesignPattern::MultiProxy   (->both???) (diamond inheritance? possible in php?) | 
| 75 |  | * @todo (o) DesignPattern::GenericAdapterProxy??? | 
| 76 |  | * @todo   (o) no 'locator/query' or 'type/component' | 
| 77 |  | * @todo   (o) even more generic: just 'adapter_metadata'    (-> global adapter registry?) | 
| 78 | * | * | 
| 79 | */ | */ | 
|  |  |  | 
|  | /** |  | 
|  | * Load required modules: |  | 
|  | * |  | 
|  | */ |  | 
|  | loadModule('Class::Logger'); |  | 
|  |  |  | 
| 80 | class DesignPattern_Proxy extends Class_Logger { | class DesignPattern_Proxy extends Class_Logger { | 
| 81 |  |  | 
| 82 | /** | /** |