1 |
joko |
1.1 |
<?php |
2 |
|
|
|
3 |
|
|
/** |
4 |
|
|
* This file contains the DesignPattern::TransparentProxy class. |
5 |
|
|
* |
6 |
|
|
* @author Andreas Motl <andreas.motl@ilo.de> |
7 |
joko |
1.3 |
* @package org.netfrag.glib |
8 |
|
|
* @name DesignPattern::TransparentProxy |
9 |
joko |
1.1 |
* |
10 |
|
|
*/ |
11 |
|
|
|
12 |
|
|
/** |
13 |
joko |
1.3 |
* $Id: TransparentProxy.php,v 1.2 2003/03/05 12:14:55 joko Exp $ |
14 |
joko |
1.2 |
* |
15 |
|
|
* $Log: TransparentProxy.php,v $ |
16 |
joko |
1.3 |
* Revision 1.2 2003/03/05 12:14:55 joko |
17 |
|
|
* re-renamed methods and privates: _handler becomes _proxy again |
18 |
|
|
* |
19 |
joko |
1.2 |
* Revision 1.1 2003/03/03 22:06:06 joko |
20 |
|
|
* enhancement to former |
21 |
joko |
1.1 |
* |
22 |
|
|
* |
23 |
|
|
*/ |
24 |
|
|
|
25 |
|
|
|
26 |
|
|
/** |
27 |
joko |
1.3 |
* Load required modules: |
28 |
|
|
* |
29 |
|
|
*/ |
30 |
|
|
loadModule('DesignPattern::Proxy'); |
31 |
|
|
|
32 |
|
|
|
33 |
|
|
/** |
34 |
joko |
1.1 |
* --- An attempt to implement some software design patterns... |
35 |
|
|
* --- TransparentProxy |
36 |
|
|
* |
37 |
joko |
1.3 |
* @link http://c2.com/cgi-bin/wiki?ProxyPattern |
38 |
joko |
1.1 |
* |
39 |
|
|
* |
40 |
joko |
1.3 |
* @name DesignPattern::TransparentProxy |
41 |
|
|
* @subpackage DesignPattern |
42 |
joko |
1.1 |
* @package org.netfrag.glib |
43 |
|
|
* |
44 |
joko |
1.3 |
* @link http://www.gnu.org/licenses/lgpl.txt |
45 |
|
|
* @license GNU LGPL (GNU Lesser General Public License) |
46 |
|
|
* |
47 |
|
|
* @link http://www.netfrag.org/~joko/ |
48 |
|
|
* @copyright (c) 2003 - All Rights reserved. |
49 |
|
|
* @author Andreas Motl <andreas.motl@ilo.de> |
50 |
joko |
1.1 |
* |
51 |
|
|
*/ |
52 |
|
|
class DesignPattern_TransparentProxy extends DesignPattern_Proxy { |
53 |
|
|
|
54 |
|
|
/* |
55 |
|
|
function create_handler() { |
56 |
|
|
$proxy = php::mkComponent( $this->get_component_name(), $this->get_component_options() ); |
57 |
|
|
$this->set_handler( $proxy ); |
58 |
|
|
$this->make_transparent(); |
59 |
|
|
} |
60 |
|
|
*/ |
61 |
|
|
|
62 |
|
|
function make_transparent() { |
63 |
|
|
//print "Trans<br/>"; |
64 |
joko |
1.2 |
$this = $this->get_proxy(); |
65 |
joko |
1.1 |
} |
66 |
|
|
|
67 |
|
|
} |
68 |
|
|
|
69 |
|
|
?> |