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 |
|
|
* @module DesignPattern::TransparentProxy |
8 |
|
|
* |
9 |
|
|
*/ |
10 |
|
|
|
11 |
|
|
/** |
12 |
|
|
* $Id: MVC.php,v 1.4 2003/03/01 22:44:54 joko Exp $ |
13 |
|
|
* |
14 |
|
|
* $Log: MVC.php,v $ |
15 |
|
|
* |
16 |
|
|
*/ |
17 |
|
|
|
18 |
|
|
|
19 |
|
|
/** |
20 |
|
|
* --- An attempt to implement some software design patterns... |
21 |
|
|
* --- TransparentProxy |
22 |
|
|
* |
23 |
|
|
* --- http://c2.com/cgi-bin/wiki?ProxyPattern |
24 |
|
|
* |
25 |
|
|
* @author Andreas Motl <andreas.motl@ilo.de> |
26 |
|
|
* @copyright (c) 2003 - All Rights reserved. |
27 |
|
|
* @license GNU LGPL (GNU Lesser General Public License) |
28 |
|
|
* |
29 |
|
|
* @author-url http://www.netfrag.org/~joko/ |
30 |
|
|
* @license-url http://www.gnu.org/licenses/lgpl.txt |
31 |
|
|
* |
32 |
|
|
* @package org.netfrag.glib |
33 |
|
|
* @module DesignPattern::TransparentProxy |
34 |
|
|
* |
35 |
|
|
*/ |
36 |
|
|
|
37 |
|
|
|
38 |
|
|
/** |
39 |
|
|
* Load required modules: |
40 |
|
|
* |
41 |
|
|
*/ |
42 |
|
|
loadModule('DesignPattern::Proxy'); |
43 |
|
|
|
44 |
|
|
class DesignPattern_TransparentProxy extends DesignPattern_Proxy { |
45 |
|
|
|
46 |
|
|
/* |
47 |
|
|
function create_handler() { |
48 |
|
|
$proxy = php::mkComponent( $this->get_component_name(), $this->get_component_options() ); |
49 |
|
|
$this->set_handler( $proxy ); |
50 |
|
|
$this->make_transparent(); |
51 |
|
|
} |
52 |
|
|
*/ |
53 |
|
|
|
54 |
|
|
function make_transparent() { |
55 |
|
|
//print "Trans<br/>"; |
56 |
|
|
$this = $this->get_handler(); |
57 |
|
|
} |
58 |
|
|
|
59 |
|
|
} |
60 |
|
|
|
61 |
|
|
?> |